-
Notifications
You must be signed in to change notification settings - Fork 6.1k
move activation dispatches into helper function #3656
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
move activation dispatches into helper function #3656
Conversation
class Mish(torch.nn.Module): | ||
def forward(self, hidden_states): | ||
return hidden_states * torch.tanh(torch.nn.functional.softplus(hidden_states)) | ||
|
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.
Not used
The documentation is not available anymore as the PR was closed or merged. |
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
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.
Short and clean refactor! 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.
Great clean-up! This will help a lot :-)
Could you add some quick tests as well?
2169bc4
to
be9d632
Compare
done! |
* move activation dispatches into helper function * tests
* move activation dispatches into helper function * tests
re: #3302