tensorflow-resnet icon indicating copy to clipboard operation
tensorflow-resnet copied to clipboard

inference_small function return none

Open hanbim520 opened this issue 7 years ago • 3 comments

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/resnet_train.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$

hanbim520 avatar Apr 22 '17 10:04 hanbim520

add “ return inference_small_config(x, c)” in inference_small function

QihuaCheng avatar Apr 23 '17 12:04 QihuaCheng

"add “ return inference_small_config(x, c)” in inference_small function" is work.

EricWang-ML avatar Dec 30 '17 05:12 EricWang-ML

To fix the error, just modify Line 104 in resnet.py to "return inference_small_config(x, c)" as @ymzhang1919 said

zl535320706 avatar Feb 03 '18 12:02 zl535320706