I know that Pyro has a GPR API. So I think that one can learn the hyperparameter (assume the RBF kernel, and the two kernel parameters being the learnable hyperparameters) instead of using your own setup with a PyTorch optimizer. I can’t figure out how to do it I have looked at the GPR introduction and Gaussian Processes — Pyro Tutorials 1.8.4 documentation.
Best regards,
Sunny