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

ValueError: Cannot feed value of shape (0,) for Tensor 'Placeholder:0', which has shape '(?, 128, 128, 3)' #12

Open
antlernana opened this issue Nov 16, 2018 · 1 comment

Comments

@antlernana
Copy link

/usr/bin/python3.5 /home/jacli/FaceRank/run_model.py
(?, 128, 128, 24)
(?, 64, 64, 24)
(?, 64, 64, 96)
(?, 32, 32, 96)
WARNING:tensorflow:From /home/jacli/FaceRank/run_model.py:107: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.

See tf.nn.softmax_cross_entropy_with_logits_v2.

[]
0
(0,)
Traceback (most recent call last):
File "/home/jacli/FaceRank/run_model.py", line 147, in
pred_result_test=sess.run(pred_result, feed_dict={x: batch_xs,keep_prob: 1.})
File "/home/jacli/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 929, in run
run_metadata_ptr)
File "/home/jacli/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1128, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (0,) for Tensor 'Placeholder:0', which has shape '(?, 128, 128, 3)'

Process finished with exit code 1

@nibabaa
Copy link

nibabaa commented Dec 18, 2018

because test images counts is at least to 20,it is twice the batch size(10)
or you can turn small batch size in line 24 and line 125

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