-
Notifications
You must be signed in to change notification settings - Fork 172
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
Don't use plain forward in python #3
Comments
Thanks, I didn't know that. I added the changes. Do you know whether it only affects the "hooks" or whether it has an impact on the forward/ backward pass? |
It does not have an impact on the forward/backward passes in general, but some more complicated models use these hooks as part of their logic, because it is highly dynamical. |
thanks for the explanation! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In opposite to what you say in the section
it is not recommended, to call the plain
forward
in python.If this would, be the same, the
__call__
method (which is called if you call a class) would be something like this:But instead it is slightly more complex :
because it also deals with all the registered hooks (which wouldn't be considered when calling the plain
forward
).The text was updated successfully, but these errors were encountered: