Skip to content

How to fix parameter in kernels? #2238

Answered by gpleiss
HanyangHenry-Wang asked this question in Q&A
Discussion options

You must be logged in to vote

There's a few ways to accomplish this, but the easiest way is to set:

# self.covar_module = ScaleKernel(RBFKernel())
self.covar_module.base_kernel.raw_lengthscale.requires_grad_(False)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HanyangHenry-Wang
Comment options

@findoctorlin
Comment options

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