-
Notifications
You must be signed in to change notification settings - Fork 78
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
dimension error #3
Comments
Hi ! Did you solve this problem? I also encountered the same situation during prediction “ Dimension 1 in both shapes must be equal, but are 19 and 3 for 'Assign_32' (op: 'Assign') with input shapes: [256,19], [256,3]. ” |
Hi i have the same problem, did anyone find the solution |
perhaps this is a mismatch in the number of output classes. Check the output classes of the checkpoint and the base model. |
@hoanganh928 is right. dataset_download.sh is failure. |
predict.py line 28 and above, change class_names = ['Coat', 'Kaftan', 'Robe'] |
I don't know why it's giving me dimension error, during prediction?
Traceback (most recent call last):
File "predict.py", line 225, in
predict_model(image_crops, image_crops_name)
File "predict.py", line 54, in predict_model
model = create_model(False, True, input_shape, len(class_names), optimizer, learn_rate, decay, momentum, activation, dropout_rate)
File "/home/prashant/DeepFashion/model.py", line 67, in create_model
model.load_weights(top_model_weights_path_load, by_name=True)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2570, in load_weights
load_weights_from_hdf5_group_by_name(f, self.layers)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 3111, in load_weights_from_hdf5_group_by_name
K.batch_set_value(weight_value_tuples)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 2183, in batch_set_value
assign_op = x.assign(assign_placeholder)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 594, in assign
return state_ops.assign(self._variable, value, use_locking=use_locking)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 276, in assign
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 59, in assign
use_locking=use_locking, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3162, in create_op
compute_device=compute_device)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3208, in _create_op_helper
set_shapes_for_outputs(op)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2427, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2400, in _set_shapes_for_outputs
shapes = shape_func(op)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2330, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimension 1 in both shapes must be equal, but are 19 and 3. Shapes are [256,19] and [256,3]. for 'Assign_32' (op: 'Assign') with input shapes: [256,19], [256,3].
The text was updated successfully, but these errors were encountered: