-
Notifications
You must be signed in to change notification settings - Fork 2k
Subject: Add swish activation function support (#1804) #3879
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
Subject: Add swish activation function support (#1804) #3879
Conversation
Body: FEATURE Created Swish activation function class and unit tests
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
caisq
left a comment
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.
Reviewable status: 0 of 1 approvals obtained (waiting on @caisq and @Triforcey)
tfjs-layers/src/activations.ts, line 224 at r2 (raw file):
alpha = 1
Is this necessary? Can you provide links to related document or code? I haven't seen the Swish activation with this parameter before. Also it appears to be not used anywhere or exposed to the public API.
|
Yes, that variable is a part of the function's definition. It is referenced as β here: https://en.wikipedia.org/wiki/Swish_function. I still need to expose this to the API as a trainable parameter. I'm going to do that. I would appreciate any pointers you may have on how to go about doing that. |
caisq
left a comment
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.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @Triforcey)
tfjs-layers/src/activations.ts, line 224 at r2 (raw file):
Previously, caisq (Shanqing Cai) wrote…
alpha = 1Is this necessary? Can you provide links to related document or code? I haven't seen the Swish activation with this parameter before. Also it appears to be not used anywhere or exposed to the public API.
@Triforcey OK. I'n fine with leaving this argument in for the time being. However, for exposing it to public API, we generally strive to be consistent with our Python counterpart (tf.keras). In the case of swish, it seems that the Python counter part doesn't expose this as an argument or a trainable variable yet. See:
|
Okay, sounds good. Thank you for your assistance. |
|
@caisq the branch is ready to be merged. 😄 |
Body:
FEATURE
Created Swish activation function class and unit tests
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is