titu1994/keras-squeeze-excite-network

Error in : se.py, 23: x = multiply([init, se])"

luonango opened this issue · 3 comments

I got a problem when I run "x = multiply([init, se])" in se.py of line 23.
Could you tell me how to solve it ? thanks.

Traceback (most recent call last):
File "", line 1, in
File "/home/b3432/anaconda2/envs/Keras/lib/python2.7/site-packages/keras/layers/merge.py", line 468, in multiply
return Multiply(**kwargs)(inputs)
File "/home/b3432/anaconda2/envs/Keras/lib/python2.7/site-packages/keras/engine/topology.py", line 571, in call
self.build(input_shapes)
File "/home/b3432/anaconda2/envs/Keras/lib/python2.7/site-packages/keras/layers/merge.py", line 84, in build
output_shape = self._compute_elemwise_op_output_shape(output_shape, shape)
File "/home/b3432/anaconda2/envs/Keras/lib/python2.7/site-packages/keras/layers/merge.py", line 55, in _compute_elemwise_op_output_shape
str(shape1) + ' ' + str(shape2))
ValueError: Operands could not be broadcast together with shapes (64, 48, 48) (64, 1, 64)

I haven't set it up for channels first dim ordering yet. That's the reason it fails. Will fix in a few days.

ok, and thank you for sharing this code O_o

Fixed via f27a863.