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: Dimension size must be evenly divisible by 7 but is 1 for 'Reshape_3' (op: 'Reshape') with input shapes: [], [2] and with input tensors computed as partial shapes: input[1] = [?,7]. #104

Open
momo283 opened this issue Jan 16, 2019 · 0 comments

Comments

@momo283
Copy link

momo283 commented Jan 16, 2019

momo@momo-VirtualBox:~/deep-anpr-master$ ./train.py
WARNING:tensorflow:From ./train.py:132: 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}.

Traceback (most recent call last):
File "./train.py", line 266, in
initial_weights=initial_weights)
File "./train.py", line 174, in train
digits_loss, presence_loss, loss = get_loss(y, y_)
File "./train.py", line 133, in get_loss
digits_loss = tf.reshape(digits_loss , [-1, 7])
File "/home/momo/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 6113, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/home/momo/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/momo/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/home/momo/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1734, in init
control_input_ops)
File "/home/momo/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1570, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension size must be evenly divisible by 7 but is 1 for 'Reshape_3' (op: 'Reshape') with input shapes: [], [2] and with input tensors computed as partial shapes: input[1] = [?,7].

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

1 participant