Skip to content
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

How to get the classification result? #2

Closed
wyqnumber opened this issue Dec 14, 2015 · 1 comment
Closed

How to get the classification result? #2

wyqnumber opened this issue Dec 14, 2015 · 1 comment

Comments

@wyqnumber
Copy link

Code:
self.predictions = tf.argmax(self.scores, 1, name="predictions")

But, I want to get the classification result, such as [1, 0, 1, 1, ...], How to get it?
Thank you!

@dennybritz
Copy link
Owner

self.predictions is the classification result. For example, if you get "1", that's equivalent to [0,1]. [1, 0, 1, 1, ...] is not possible because only one class can be predicted at a time. If you want to get the probabilities for all classes you can use self.scores and use a softmax on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants