-
Notifications
You must be signed in to change notification settings - Fork 106
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
Model Error #11
Comments
i hava the same problem whith you, did you solve it? |
i aslo hava the same problem whith you, did you solve it? |
god,i have the same error,anybody got the answer? |
You need to run the command like below: |
I run the command like you said, problems still occur |
@meghana30 I tried the command your way but still getting the same error. Did anyone get any solution? |
I downloaded the checkpoint from the mentioned link: https://drive.google.com/open?id=0B1l5JSkBbENBdk95ZW1DOUhqQUE
When i run the command: python cam.py --model_path cam_checkpoint.hdf5 --image_path=image.jpg
I get the following error: File "/home/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1570, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension 0 in both shapes must be equal, but are 3 and 64. Shapes are [3,3,5,64] and [64,3,3,3]. for 'Assign' (op: 'Assign') with input shapes: [3,3,5,64], [64,3,3,3].
The full Error is:
Traceback (most recent call last):
File "cam.py", line 61, in
visualize_class_activation_map(args.model_path, args.image_path, args.output_path)
File "cam.py", line 18, in visualize_class_activation_map
model = load_model(model_path)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 246, in load_model
topology.load_weights_from_hdf5_group(f['model_weights'], model.layers)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 3189, in load_weights_from_hdf5_group
K.batch_set_value(weight_value_tuples)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 2365, in batch_set_value
assign_op = x.assign(assign_placeholder)
File "/home/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 615, in assign
return state_ops.assign(self._variable, value, use_locking=use_locking)
File "/home/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/state_ops.py", line 283, in assign
validate_shape=validate_shape)
File "/home/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_state_ops.py", line 60, in assign
use_locking=use_locking, name=name)
File "/home/user/tensorflow/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/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/home/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1734, in init
control_input_ops)
File "/home/user/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1570, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension 0 in both shapes must be equal, but are 3 and 64. Shapes are [3,3,5,64] and [64,3,3,3]. for 'Assign' (op: 'Assign') with input shapes: [3,3,5,64], [64,3,3,3].
Any idea why is this happening?
The text was updated successfully, but these errors were encountered: