Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update Part1_TensorFlow.ipynb #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
marius190 wants to merge 1 commit into MITDeepLearning:master
base: master
Choose a base branch
Loading
from marius190:patch-1

Conversation

Copy link

@marius190 marius190 commented Apr 6, 2020

row_vector = matrix[1]
column_vector = matrix[:,2]
scalar = matrix[1, 2]

You cant acces third dimension (2) in a 2x2 matrix

row_vector = matrix[1] 
column_vector = matrix[:,2]
scalar = matrix[1, 2]
You cant acces third dimension (2) in a 2x2 matrix
Copy link

alaneuler commented Jun 17, 2021
edited
Loading

matrix is actually defined by yourself in previous cell, just code it bigger than 2

Copy link

marius190 is right, the following has to replace the current code:
row_vector = matrix[0]
column_vector = matrix[:,1]
scalar = matrix[0, 1]

b0ot and robbiecarlton reacted with thumbs up emoji

Copy link

Technically, @alaneuler is right. The description uses the term "dimensions" which in this context is interchangeable with "axes" or "rank" (see TensorFlow's documentation). Whether this was intentional or not, a solution could be to define a 2xn matrix with n>=3. I do agree that it would be more appropriate to choose indexes like those @nightcap1979 proposed such that it works for all tensors with 2 axes.

Skorkmaz88 and robbiecarlton reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /