Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #changed from 9 to 33 for 11 frames input
- imgs_input = Input(shape=(33,input_height,input_width))
- Traceback (most recent call last):
- File "predict_video.py", line 55, in <module>
- m.load_weights( save_weights_path )
- File "/usr/local/lib/python2.7/dist-packages/keras/engine/network.py", line 1166, in load_weights
- f, self.layers, reshape=reshape)
- File "/usr/local/lib/python2.7/dist-packages/keras/engine/saving.py", line 1058, 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 2465, in batch_set_value
- assign_op = x.assign(assign_placeholder)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 1952, in assign
- name=name)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 227, in assign
- validate_shape=validate_shape)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 66, in assign
- use_locking=use_locking, name=name)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
- op_def=op_def)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
- return func(*args, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3616, in create_op
- op_def=op_def)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2027, in __init__
- control_input_ops)
- File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1867, 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,33,64] and [64,9,3,3]. for 'Assign' (op: 'Assign') with input shapes: [3,3,33,64], [64,9,3,3].
- imgs_input = Input(shape=(9,input_height,input_width))
- m = modelFN( n_classes , input_height=height, input_width=width )
- #load TrackNet model
- modelFN = Models.TrackNet.TrackNet
- m = modelFN( n_classes , input_height=height, input_width=width )
- m.compile(loss='categorical_crossentropy', optimizer= 'adadelta' , metrics=['accuracy'])
- #load and save from same path
- m.load_weights( save_weights_path )
- #load TrackNet 11 frames model and transfer weights
- model11 = Models.TrackNet11.TrackNet11
- m11 = model11(n_classes, input_height=height, input_width=width)
- m11.compile(loss='categorical_crossentropy', optimizer='adadelta', metrics=['accuracy'])
- m11.load_weights(m.get_weights)
- ValueError: The channel dimension of the inputs should be defined. Found `None`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement