keras-applications
keras-applications copied to clipboard
efficientnet SE modual meet backend.image_data_format trouble
https://github.com/keras-team/keras-applications/blob/976050c468ff949bcbd9b9cf64fe1d5c81db3f3a/keras_applications/efficientnet.py#L175
This code will meet trouble when backend.image_data_format() == "channels_first". It should be change as below:
if backend.image_data_format() == 'channels_last':
se = layers.Reshape((1, 1, filters), name=name + 'se_reshape')(se)
else:
se = layers.Reshape((filters, 1, 1), name=name + 'se_reshape')(se)
Thank for your working!