titu1994 / keras-squeeze-excite-network

Implementation of Squeeze and Excitation Networks in Keras
MIT License
400 stars 118 forks source link

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

Closed luonango closed 6 years ago

luonango commented 6 years ago

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)

titu1994 commented 6 years ago

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

luonango commented 6 years ago

ok, and thank you for sharing this code O_o

titu1994 commented 6 years ago

Fixed via f27a8636296a9313de3e0ee043df31b9807517ce.