I set a prior over a linear mean function in my model in gpflow 2.9.0 but, when I inspect it through the monitor, the prior does not appear.
This is my model:
import gpflow
import numpy as np
import tensorflow_probability as tfp
import tensorflow as tf
A = gpflow.Parameter(np.zeros(1))
A.prior=tfp.distributions.Normal(loc=1.0, scale=10.0)
b = gpflow.Parameter(np.zeros(1))
b.prior=tfp.distributions.Normal(loc=1.0, scale=10.0)
mf = gpflow.functions.Linear(A,b)
#I just write a simplify form of the mean. I don't write the rest of the model k, lik...
So, I want to know if there is another arg of the class Parameter that I'm using wrong
I fixed the bug creating a new class for the mean function like this:
So, to set the priors over A and b, you can do as shown in the first piece of code, then design the model, e.g., as: