Code Monkey home page Code Monkey logo

Comments (2)

Namhyunho avatar Namhyunho commented on July 2, 2024 6

수업시간에 받았던 질문 입니다.

x_data = xy[ : , 1:-1] <- 배추가격 문제에서

  1. 여기서 " , " 가 왜 있는 건가요?
  2. 그리고 [ 1 : -1 ] 이 의미하는 의미가 뭔가요?

1번의 답변
[ 행(rows) , 열(columns)]을 의미합니다.

2번의 답변
저 표현은 python의 Slicing 개념입니다.
배추가격의 데이터는 [2922 rows x 6 columns]로 이루어져 있습니다. (2922행 6열)
그중 [ : , 1:-1 ] 이면
[모든행 , 열중 처음 두열과 마지막 한열을 제외]
에 해당하는 데이터를 사용하겠다는 의미입니다.

slicing


W = tf.Variable(tf.random_normal([2, 1]), name="weight") <- 실습코드중

  1. tf.random_normal([2, 1]) ] 여기서 [2, 1]이 의미가 뭔가요??

[ a , b , c ...] -> " , "가 하나씩 늘어나면서 공간이(차원) 하나씩 늘어난다고 생각하시면 편할 것 같습니다.
[ 2 , 1 ] 에기서 1은 하나의 요소로 이루어진 벡터이고 2는 요소가 1개인 벡터가 2개로 이루어진 행렬이 됩니다. 그렇다면 [2, 2 ,1 ]이면 어떻게 될까요?
요소가 1개인 벡터가 2개인 행렬이 2개로 나타날 것입니다.

예시2
예시3

저의 기억에 남았던 질문들만 정리해서 올렸습니다.

from 2019.spring.ai.

unizard avatar unizard commented on July 2, 2024

@ALL 실습관련 기타 질문은 이쪽으로 코멘트 부탁드립니다.

from 2019.spring.ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.