You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
修改代码直接调用会有bug
修改如下:
with tf.contrib.slim.arg_scope(mobilenet_v2.training_scope()):
out, endpoints = mobilenet_v2.mobilenet(input_tensor=input_images)
BUG如下:
Traceback (most recent call last):
File "train_v2.py", line 213, in
snapshot_prefix=snapshot_prefix)
File "train_v2.py", line 158, in train
tf.losses.softmax_cross_entropy(onehot_labels=input_labels, logits=out)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/ops/losses/losses_impl.py", line 732, in softmax_cross_entropy
logits.get_shape().assert_is_compatible_with(onehot_labels.get_shape())
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 764, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (?, 1001) and (?, 4) are incompatible
The text was updated successfully, but these errors were encountered:
修改代码直接调用会有bug
修改如下:
with tf.contrib.slim.arg_scope(mobilenet_v2.training_scope()):
out, endpoints = mobilenet_v2.mobilenet(input_tensor=input_images)
BUG如下:
Traceback (most recent call last):
File "train_v2.py", line 213, in
snapshot_prefix=snapshot_prefix)
File "train_v2.py", line 158, in train
tf.losses.softmax_cross_entropy(onehot_labels=input_labels, logits=out)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/ops/losses/losses_impl.py", line 732, in softmax_cross_entropy
logits.get_shape().assert_is_compatible_with(onehot_labels.get_shape())
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 764, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (?, 1001) and (?, 4) are incompatible
The text was updated successfully, but these errors were encountered: