-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
np eye visualization. #23
Comments
I'm sorry but I don't understand your question and I cannot find this code in Tutorial 09. |
well it was lesson 9(video data) it was the one_hot_encoded method return statement. |
It is a fast way of converting class-numbers to one-hot encoded arrays. I think one-hot encoded arrays were explained in one of the early tutorials. Here's an example:
|
result = np.eye(num_classes, dtype=float)
print(result)
ans = result[class_numbers]
i do not understand the array qualifier on the result for no.eye(). for lesson 9, you had over 4170 class_numbers as a list.
np.eye(3) returns
array([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])
so how array([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]]) [4170] works?
i am seriously confused.
The text was updated successfully, but these errors were encountered: