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

Bug with GridInterpolationKernel and Variables with 'requires_grad=True' #102

Closed
samuelstanton opened this issue Apr 12, 2018 · 4 comments
Closed
Labels

Comments

@samuelstanton
Copy link
Contributor

Currently trying to evaluate a GP using GridInterpolationKernel on test points stored as torch.nn.Parameter.

Line 89 in utils/interpolation.py results in an assertion error from
assert not ctx.needs_input_grad[2] in torch/autograd/_functions/tensor.py

You can produce this error by putting
x = Variable(torch.Tensor(1, 2).uniform_(), requires_grad=True)
model(x)
at the end of the kissgp_kronecker_product_regression.ipython notebook in examples.

This issue does not occur when using RBFKernel or SpectralMixtureKernel
I reproduced this issue after doing a fresh pull and install of gpytorch, traceback attached.

traceback.txt

@gpleiss
Copy link
Member

gpleiss commented Apr 13, 2018

Which version of PyTorch are you using?

@samuelstanton
Copy link
Contributor Author

0.3.1

@gpleiss
Copy link
Member

gpleiss commented Apr 16, 2018

Sorry for the slow reply. I'll investigate today.

@gpleiss gpleiss added the bug label Apr 16, 2018
@jacobrgardner
Copy link
Member

@samuelstanton @gpleiss Fixed by 8b50f2f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants