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 make single prediction #13
Comments
Hello, Hope it helped. |
Hello
Other question when I load an image from other sources, and reshape it like that. I will not have the label to it, but i have to still give a dummy item to Y right? Is there a more elegant solution? Something like: predicted_label=sess.run(prediction, feed_dict={X:img}) What is the role of Y in th sess.run when the training is done? p.s A faster solution is with the numpy, but reshape was not good for me, I had to add a dimension like that and it works now :
|
You can actually run the predict op without passing in Y:teY since Y isn't part of the predict_op graph. You can just run sess.run(predict_op, feed_dict={X: teX})) |
Yeah i figured that out, thanks! |
Hi
I am new to tensorflow, and I am stuck at your logistic_expression example.
I trained and saved the model, restored it, but I am unable to use it. Can you help me with that?
I tried:
print (sess.run(predict_op, feed_dict={X: teX[66], Y: teY[66]}))
I am expecting a 6 here as output (or a number at least :D) but I got an error:
ValueError: Cannot feed value of shape (784,) for Tensor 'Placeholder:0', which has shape '(?, 784)'
The text was updated successfully, but these errors were encountered: