Skip to content

SingleTaskGP On Multiple Outputs - Train Inputs Has Extra Unexpected Dimension? #2654

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

You must be logged in to vote

Hi @bchen0. train_inputs is a property of the underlying GPyTorch model, which follows different shape conventions than BoTorch. Under the hood, a SingleTaskGP is a batched ExactGP model, where the output dimension is represented as the right-most batch dimension (dim=-3). So, what you're observing is just as expected.

Is there a case where gp.train_inputs[0] would be different from gp.train_inputs[1] and so forth?

If you manually constructed a batched single-output model, then each train_inputs[i] could be different. Something like

gp = SingleTaskGP(
    train_X=torch.rand(batch, q, d),
    train_Y=torch.randn(batch, q, m),
)

will have train_inputs of shape batch x (m) x q x d (m dime…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by bchen0
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