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

I met this error about CorrMM images and kernel must have the same stack size #36

Open
hhya1013 opened this issue Aug 1, 2019 · 1 comment

Comments

@hhya1013
Copy link

hhya1013 commented Aug 1, 2019

Thanks for you code,whenI run it,i met this error, I hope you can help me solve this problem.
Traceback (most recent call last):
File "main.py", line 114, in
predictions = m.predict_generator(generator_test(b_s=b_s, imgs_test_path=imgs_test_path), nb_imgs_test)[0]
File "/home/han/.local/lib/python2.7/site-packages/keras/engine/training.py", line 1634, in predict_generator
outs = self.predict_on_batch(x)
File "/home/han/.local/lib/python2.7/site-packages/keras/engine/training.py", line 1274, in predict_on_batch
outputs = self.predict_function(ins)
File "/home/han/.local/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 717, in call
return self.function(*inputs)
File "/home/han/.local/lib/python2.7/site-packages/theano/compile/function_module.py", line 898, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/han/.local/lib/python2.7/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/han/.local/lib/python2.7/site-packages/theano/compile/function_module.py", line 884, in call
self.fn() if output_subset is None else
ValueError: CorrMM images and kernel must have the same stack size

Apply node that caused the error: CorrMM{half, (1, 1), (1, 1)}(InplaceDimShuffle{0,3,1,2}.0, Subtensor{::, ::, ::int64, ::int64}.0)
Toposort index: 1222
Inputs types: [TensorType(float32, (True, False, False, False)), TensorType(float32, 4D)]
Inputs shapes: [(1, 40, 512, 30), (1, 1, 512, 512)]
Inputs strides: [(160, 4, 4800, 160), (1048576, 1048576, -2048, -4)]
Inputs values: ['not shown', 'not shown']
Outputs clients: [[Subtensor{int64:int64:int8, int64:int64:int8, int64:int64:int8, :int64:}(CorrMM{half, (1, 1), (1, 1)}.0, Constant{0}, Constant{1}, Constant{1}, ScalarFromTensor.0, ScalarFromTensor.0, Constant{1}, ScalarFromTensor.0, ScalarFromTensor.0, Constant{1}, Constant{30})]]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "main.py", line 65, in
m = Model(input=[x, x_maps], output=sam_resnet([x, x_maps]))
File "/home/han/sam-master/models.py", line 136, in sam_resnet
nb_cols=3, nb_rows=3)(att_convlstm)
File "/home/han/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 514, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/home/han/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 572, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/home/han/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 149, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "/home/han/sam-master/attentive_convlstm.py", line 143, in call
initial_states = self.get_initial_states(x)
File "/home/han/sam-master/attentive_convlstm.py", line 42, in get_initial_states
initial_state = K.conv2d(initial_state, K.zeros((self.nb_filters_out, self.nb_filters_in, 1, 1)), border_mode='same')
File "/home/han/.local/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 1135, in conv2d
filter_shape=filter_shape)

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

@Abdulla-Al-Suman
Copy link

Hi @hhya1013, did you solved the problem?

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

2 participants