-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Squeeze and Excite block #505
Conversation
Marking this as ready to review as #480 is now merged. |
@LukeWood this needs to have the GSoC2022 label. |
I have made the changes, please review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM given the linting tests pass!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment then LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last round of comments
@LukeWood I have a workaround for the failing tests: def custom_compare(obj1, obj2):
if isinstance(obj1, (core.FactorSampler, tf.keras.layers.Layer)):
return config_equals(obj1.get_config(), obj2.get_config())
elif inspect.isfunction(obj1):
return tf.keras.activations.serialize(obj1) == obj2
elif inspect.isfunction(obj2):
return obj1 == tf.keras.activations.serialize(obj2)
else:
return obj1 == obj2 The tests were failing when the passed object is a function. So, we check if it is a function and serialize it if it is. I'll replace |
Awesome! Thanks for investigating this. Let’s update so the tests pass! |
@LukeWood Done. |
Even though this is a valid workaround at the moment, it would be interesting to see if there is any concrete solution to serializing and deserializing of functions. WDYT? Or is there some existing solution to this? |
Could you please take a look at this one when you get a moment? TIA |
Could you please take a look at this one? Please let me know if there's anything you'd like me to change. |
Thank you for the PR Aditya, merged |
* Added SE block * Formatted * Made requested changes * Final touches to SqueezeAndExcite * Final touches to SqueezeAndExcite * Made requested changes * Formatted * Added activation arguments * Made requested changes * Serialization tests workaround * Made requested changes
* Added SE block * Formatted * Made requested changes * Final touches to SqueezeAndExcite * Final touches to SqueezeAndExcite * Made requested changes * Formatted * Added activation arguments * Made requested changes * Serialization tests workaround * Made requested changes
Added SE Block. As discussed, this one can be done after #480 and #499 are merged.
/auto Closes #167