Open hanbim520 opened 7 years ago
add “ return inference_small_config(x, c)” in inference_small function
"add “ return inference_small_config(x, c)” in inference_small function" is work.
To fix the error, just modify Line 104 in resnet.py to "return inference_small_config(x, c)" as @ymzhang1919 said
sudo python train_cifar.py
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02. Traceback (most recent call last): File "train_cifar.py", line 320, in
tf.app.run()
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train_cifar.py", line 316, in main
train(is_training, logits, images, labels)
File "/Users/abc/work/tensorflow-resnet/resnettrain.py", line 33, in train
loss = loss(logits, labels)
File "/Users/abc/work/tensorflow-resnet/resnet.py", line 150, in loss
cross_entropy = tf.nn.sparse_softmax_cross_entropy_with_logits(logits, labels)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1684, in sparse_softmax_cross_entropy_with_logits
labels, logits)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1535, in _ensure_xent_args
raise ValueError("Both labels and logits must be provided.")
ValueError: Both labels and logits must be provided.
abcdeMacBook-Pro:tensorflow-resnet abc$