Skip to content

Bug in MultiTaskGP Example #446

@hmedal

Description

@hmedal

Issue description

The example given for MultiTaskGP throws an error when I run it.

Code example

When I run the example given for MultiTaskGP (https://botorch.org/api/models.html#botorch.models.multitask.MultiTaskGP), it throws this error:

RuntimeError Traceback (most recent call last)
in
7 print(torch.cat([X1, i1], -1))
8 print(torch.cat([X2, i2], -1))
----> 9 train_X = torch.stack([torch.cat([X1, i1], -1), torch.cat([X2, i2], -1)])
10 train_Y = torch.cat(f1(X1), f2(X2))
11 print(train_Y)

RuntimeError: stack expects each tensor to be equal size, but got [10, 3] at entry 0 and [20, 3] at entry 1

Also, line 10 (train_Y = torch.cat(f1(X1), f2(X2))) gives the following error:

TypeError: cat() received an invalid combination of arguments - got (Tensor, Tensor), but expected one of:

  • (tuple of Tensors tensors, name dim, *, Tensor out)
  • (tuple of Tensors tensors, int dim, *, Tensor out)

System Info

Please provide information about your setup, including

  • BoTorch Version: 0.2.4
  • GPyTorch Version: 1.1.1
  • PyTorch Version: 1.5.0
  • Computer OS: Mac OSX Catalina

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions