titu1994 / keras-squeeze-excite-network

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

error while running se_inception_resnet_v2.py #17

Closed prativadas closed 4 years ago

prativadas commented 4 years ago

Getting an error while running se_inception_resnet_v2.py

TypeError: () got an unexpected keyword argument 'scale'

eric-yates commented 4 years ago

I'm getting this same error.

  File "/paperspace/cnn_compiler.py", line 137, in compile_cnn_model
    model = SEInceptionResNetV2(weights='imagenet', include_top=False, pooling='avg')
  File "/paperspace/cnn_senet.py", line 276, in SEInceptionResNetV2
    block_idx=block_idx)
  File "/paperspace/cnn_senet.py", line 157, in inception_resnet_block
    name=block_name)([x, up])
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 554, in __call__
    outputs = self.call(inputs, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/layers/core.py", line 743, in call
    return self.function(inputs, **arguments)
TypeError: <lambda>() got an unexpected keyword argument 'scale'
eric-yates commented 4 years ago

Solved. Change line 160 in se_inception_resnet_v2.py from:

arguments={'scale': scale},

to:

arguments={'scale_': scale},
prativadas commented 4 years ago

Solved. Change line 160 in se_inception_resnet_v2.py from:

arguments={'scale': scale},

to:

arguments={'scale_': scale},

thank you so much for replying. error resolved