-
Notifications
You must be signed in to change notification settings - Fork 404
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
Apply input transforms when computing MLL in model closures #2527
Conversation
This pull request was exported from Phabricator. Differential Revision: D62497392 |
This pull request was exported from Phabricator. Differential Revision: D62497392 |
…2527) Summary: Pull Request resolved: pytorch#2527 During model training, the input transforms are applied in `model.forward`. While evaluating the model closures, we pass in the train inputs to the `mll`, which passed them down to the `likelihood`. If we don't transform the inputs before passing them into `mll`, we end up evaluating `model.forward` and `likelihood` using different inputs. This is not an issue during the `posterior` evaluation, since the transforms are applied in `model.posterior` before being passed to `model.__call__` and `likelihood`. This diff updates the model closures to transform the inputs before passing them into `mll`. Fixes pytorch#2515 Differential Revision: D62497392
83fc1c2
to
02d38d1
Compare
This pull request was exported from Phabricator. Differential Revision: D62497392 |
02d38d1
to
ba89e7a
Compare
…2527) Summary: Pull Request resolved: pytorch#2527 During model training, the input transforms are applied in `model.forward`. While evaluating the model closures, we pass in the train inputs to the `mll`, which passed them down to the `likelihood`. If we don't transform the inputs before passing them into `mll`, we end up evaluating `model.forward` and `likelihood` using different inputs. This is not an issue during the `posterior` evaluation, since the transforms are applied in `model.posterior` before being passed to `model.__call__` and `likelihood`. This diff updates the model closures to transform the inputs before passing them into `mll`. Fixes pytorch#2515 Differential Revision: D62497392
…2527) Summary: Pull Request resolved: pytorch#2527 During model training, the input transforms are applied in `model.forward`. While evaluating the model closures, we pass in the train inputs to the `mll`, which passed them down to the `likelihood`. If we don't transform the inputs before passing them into `mll`, we end up evaluating `model.forward` and `likelihood` using different inputs. This is not an issue during the `posterior` evaluation, since the transforms are applied in `model.posterior` before being passed to `model.__call__` and `likelihood`. This diff updates the model closures to transform the inputs before passing them into `mll`. Fixes pytorch#2515 Reviewed By: SebastianAment Differential Revision: D62497392
This pull request was exported from Phabricator. Differential Revision: D62497392 |
ba89e7a
to
5d9c738
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2527 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 193 193
Lines 16996 17000 +4
=======================================
+ Hits 16994 16998 +4
Misses 2 2 ☔ View full report in Codecov by Sentry. |
This pull request has been merged in c895a8d. |
Summary:
During model training, the input transforms are applied in
model.forward
. While evaluating the model closures, we pass in the train inputs to themll
, which passed them down to thelikelihood
. If we don't transform the inputs before passing them intomll
, we end up evaluatingmodel.forward
andlikelihood
using different inputs.This is not an issue during the
posterior
evaluation, since the transforms are applied inmodel.posterior
before being passed tomodel.__call__
andlikelihood
.This diff updates the model closures to transform the inputs before passing them into
mll
.Fixes #2515
Differential Revision: D62497392