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

Apply input transforms when computing MLL in model closures #2527

Closed
wants to merge 1 commit into from

Commits on Sep 13, 2024

  1. Apply input transforms when computing MLL in model closures (pytorch#…

    …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
    saitcakmak authored and facebook-github-bot committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    5d9c738 View commit details
    Browse the repository at this point in the history