Nevermind:

```
class TavgRBF(pyro.nn.PyroModule):
def __init__(self, x, y, variance=None, lengthscale=None, noise=None):
super(TavgRBF, self).__init__()
self.tavg_kernel = gp.kernels.RBF(input_dim=1, variance=variance, lengthscale=lengthscale)
self.tavg_gpr = gp.models.GPRegression(x, y, self.tavg_kernel, noise=noise)
def train(self, num_steps=2500, patience=60, min_delta=0.05, lr=0.5, gamma=0.1):
train_gp(self.tavg_gpr, num_steps=num_steps, patience=patience, min_delta=min_delta, lr=lr, gamma=gamma)
tavg_rbf = TavgRBF(week_data, tavg_scaled, variance=torch.tensor(5.), lengthscale=torch.tensor(10.), noise=torch.tensor(1.))
tavg_rbf.train()
for key, value in pyro.get_param_store().named_parameters():
print(f"{key}: {value}")
```

Results in:

```
early stopping at step 124 with loss tensor(2078.0801, grad_fn=<AddBackward0>)
tavg_gpr.kernel.lengthscale: 0.6094868183135986
tavg_gpr.kernel.variance: -0.7992058396339417
tavg_gpr.noise: -0.6146970391273499
```