Skip to content

forward and posterior of SingleTask #2068

Answered by saitcakmak
skiyohara asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @skiyohara. Model.forward(...) evaluates the model prior. It is typically used by GPyTorch while computing the model posterior. What you get when you call model(X_train) is model.__call__(X_train), which does a lot more than evaluating model.forward. When the model is in eval mode, GPyTorch computes the posterior on call. We generally do not recommend directly using these methods with BoTorch models.

You can think of Model.posterior as a wrapper around the GPyTorch posterior computations. In addition to computing the posterior, it applies any necessary transforms to both inputs and outputs, wraps the MVN in a Posterior object, and ensures that the output has a consistent shape that is …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@skiyohara
Comment options

Answer selected by skiyohara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants