Skip to content

Conversation

@jaintj95
Copy link
Contributor

As per pytorch documentation, use of model.forward is discouraged:

pytorch master documentation

Also see:
https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690

Copy link
Contributor

@mcleonard mcleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. We're not using any hooks here so it shouldn't matter much, but you're right that it is better practice to call the module/model directly instead of the forward method.

@mcleonard mcleonard merged commit 1be1333 into udacity:master Nov 20, 2018
GedasGa pushed a commit to GedasGa/deep-learning-v2-pytorch that referenced this pull request Mar 24, 2019
Replace model.forward() with model()
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 this pull request may close these issues.

2 participants