Hi, I'm trying to implement your code on my own server. But when I entered the /dreyeve-master/experiments/train$ directory and typed " python train.py", it showes "ValueError: total size of new array must be unchanged". The full information is as follows:
Traceback (most recent call last):
File "train.py", line 114, in
fine_tuning()
File "train.py", line 20, in fine_tuning
model = DreyeveNet(frames_per_seq=frames_per_seq, h=h, w=w)
File "/data/aaa/dreyeve-master/experiments/train/models.py", line 123, in DreyeveNet
im_net = SaliencyBranch(input_shape=(3, frames_per_seq, h, w), c3d_pretrained=True, branch='image')
File "/data/aaa/dreyeve-master/experiments/train/models.py", line 72, in SaliencyBranch
coarse_predictor = CoarseSaliencyModel(input_shape=(c, fr, h // 4, w // 4), pretrained=c3d_pretrained, branch=branch)
File "/data/aaa/dreyeve-master/experiments/train/models.py", line 47, in CoarseSaliencyModel
H = Reshape(target_shape=(512, h // 8, w // 8))(H) # squeeze out temporal dimension
File "/data/aaa/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 569, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/data/aaa/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 632, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/data/aaa/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 168, in create_node
output_shapes = to_list(outbound_layer.get_output_shape_for(input_shapes[0]))
File "/data/aaa/.local/lib/python2.7/site-packages/keras/layers/core.py", line 336, in get_output_shape_for
self.target_shape)
File "/data/aaa/.local/lib/python2.7/site-packages/keras/layers/core.py", line 330, in _fix_unknown_dimension
raise ValueError(msg)
"
It seems that the bug comes from this line:
H = Reshape(target_shape=(512, h // 8, w // 8))(H) # squeeze out temporal dimension
line 47 in the models.py
I have searched about this error, but still have no clues. So could you be so kind to help me with this issue?
Thank you!