You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement a simple custom loss function for the purpose of finding the least-squares projection ||f(x) - y||_2 to a pre-trained GP f defined by the model manifold_GP. I can provide an initial guess for x.
I have tried a million ways and failed. Below is my latest attempt.
Can you please tell me how to do this?
y = y_train[[1]]
def loss() -> tf.Tensor:
Y_predicted = manifold_GP.predict_f(x_initial)
squared_error = (Y_predicted - tf.convert_to_tensor(y)) ** 2
return tf.reduce_mean(squared_error)
x_initial = np.array(x_test[[0]]) # Initial guess for x
opt = gpflow.optimizers.Scipy()
result = opt.minimize(loss, variables=[tf.Variable(x_initial)])
Documentation/tutorial notebooks
Is there anything missing in the docs?
Are there any mistakes in the docs?
Is there a feature that needs some example code in a notebook?
Do you know how to fix the docs? If so, it'd be amazing if you'd be willing to directly contribute a pull request :)
Hello,
I am trying to implement a simple custom loss function for the purpose of finding the least-squares projection
||f(x) - y||_2
to a pre-trained GP f defined by the modelmanifold_GP
. I can provide an initial guess for x.I have tried a million ways and failed. Below is my latest attempt.
Can you please tell me how to do this?
Documentation/tutorial notebooks
Is there anything missing in the docs?
Are there any mistakes in the docs?
Is there a feature that needs some example code in a notebook?
Do you know how to fix the docs? If so, it'd be amazing if you'd be willing to directly contribute a pull request :)
Links:
The text was updated successfully, but these errors were encountered: