Skip to content
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

Incorrect use Lux.ActivationFunction #737

Closed
avik-pal opened this issue Jun 23, 2022 · 3 comments · Fixed by #742
Closed

Incorrect use Lux.ActivationFunction #737

avik-pal opened this issue Jun 23, 2022 · 3 comments · Fixed by #742

Comments

@avik-pal
Copy link
Member

The updated docs have used ActivationFunction in https://diffeqflux.sciml.ai/dev/examples/neural_ode/ (and possibly other places). Note that the semantics of ActivationFunction is different from the intended use case -- See http://lux.csail.mit.edu/stable/api/layers/#Lux.WrappedFunction vs http://lux.csail.mit.edu/stable/api/layers/#Lux.ActivationFunction (the intention of having this layer was to allow a very rudimentary implementation of layer fusion, which I might still implement later on)

Additionally, this should not be done, since http://lux.csail.mit.edu/stable/api/layers/#Lux.Chain will automatically do it for the user (and IMO makes code less clunky)

@Abhishek-1Bhatt
Copy link
Contributor

Should we switch to WrappedFunction in the docs then?

@avik-pal
Copy link
Member Author

No no. Just remove any wrapper, Chain will do it on its own.

@Abhishek-1Bhatt
Copy link
Contributor

Oh, yeah it returns it as a WrappedFunction by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants