Gpytorch: [Bug] Example for Deep Kernel Learning is out of date.

Created on 14 Nov 2019  路  4Comments  路  Source: cornellius-gp/gpytorch

馃悰 Bug

When running the CIFAR 10 example, it gives a shape mismatch error.

To reproduce

Run this line by line in iPython (use dataset = 'cifar10' as in the example):

https://github.com/cornellius-gp/gpytorch/blob/master/examples/08_Deep_Kernel_Learning/Deep_Kernel_Learning_DenseNet_CIFAR_Tutorial.ipynb


** Stack trace/error message **

     49     def initialize_variational_distribution(self, prior_dist):
---> 50         self.variational_mean.data.copy_(prior_dist.mean)
     51         self.variational_mean.data.add_(self.mean_init_std, torch.randn_like(prior_dist.mean))
     52         self.chol_variational_covar.data.copy_(prior_dist.lazy_covariance_matrix.cholesky().evaluate())

RuntimeError: output with shape [64] doesn't match the broadcast shape [132, 64]
 ```
from

gpytorch/variational/cholesky_variational_distribution.py in initialize_variational_distribution(self, prior_dist)
```

Expected Behavior

It should train a DKL, but errors when training.

System information

Please complete the following information:

  • 0.3.6
  • 1.3.1
  • Ubuntu 16.04.6

Additional context

Add any other context about the problem here.

DKL bug documentation variational

Most helpful comment

@mmirtcho - the examples on the master branch need to be updated to match the variational refactors. This should happen shortly.

All 4 comments

P.S. https://github.com/cornellius-gp/gpytorch/blob/239a461fc6aa99fefb414620737b2619f0fe48a1/examples/08_Deep_Kernel_Learning/Deep_Kernel_Learning_DenseNet_CIFAR_Tutorial.ipynb works if you download the non-master branch, but the one from

Fixed uses of log_transform

@Chillee
Chillee committed on Nov 27, 2018

I think the issue is using gpytorch.models.ApproximateGP instead of gpytorch.models.AdditiveGridInducingVariationalGP

I think the issue is using gpytorch.models.ApproximateGP instead of gpytorch.models.AdditiveGridInducingVariationalGP

I used it with gpytorch.models.AbstractVariationalGP.

I think the issue is using gpytorch.models.ApproximateGP instead of gpytorch.models.AdditiveGridInducingVariationalGP

I used it with gpytorch.models.AbstractVariationalGP.

I still get the same error when using gpytorch.models.AbstractVariationalGP

@mmirtcho - the examples on the master branch need to be updated to match the variational refactors. This should happen shortly.

Was this page helpful?
0 / 5 - 0 ratings