keras-team / tf-keras

The TensorFlow-specific implementation of the Keras API, which was the default Keras from 2019 to 2023.
Apache License 2.0
63 stars 28 forks source link

Error in EfficientNet V2 MBConvBlock #329

Closed sebastian-sz closed 1 year ago

sebastian-sz commented 1 year ago

System information.

Describe the problem. There is an error in EfficientNetV2's MBConvBlock - the final conv layers are not applied if Squeeze and Excitation block is not applied. This is an error, found by @DavidLandup0 in Keras-CV repo.

"Luckily" for MBConvBlock the SE Block is always applied so no need to change the weights.

Describe the current behavior. Currently, the model works by accident.

Describe the expected behavior. The MBConvBlock should work correctly even without SE Block.

Contributing.

Standalone code to reproduce the issue. N/A

Source code / logs. Current faulty MBConvBlock implementation. Current FusedMBConvBlock implementation, without this issue. David's fixed implementation.

Thanks again @DavidLandup0 for finding this issue.

tilakrayal commented 1 year ago

@sebastian-sz, We would prefer a PR for the validation, Could you please feel free to submit a PR for the requested change to be made. Thank you!

sebastian-sz commented 1 year ago

@tilakrayal PR present at https://github.com/keras-team/keras/pull/17364

tilakrayal commented 1 year ago

The pr has been assigned for reviewing and once it is merged this issue will move to closed status.