Search code examples
gpflow

Feeding arguments to predict_y in gpflow trough feed_dict


Is it possible to feed inputs to m.predict_y trough a dictionary? Something similar like in the examples for computing the log likelihood:

model.compute_log_likelihood(feed_dict={x_tensor: x_new, y_tensor: y_new})

#this
model.predict_y(feed_dict={Xnew: x_new})

Solution

  • No, predict_y() expects numpy arrays for the new X, as the new X parameter is handled inside autoflow, which automatically calls session.run(). You can pass in tensors and their values for any other inputs to the graph.

    To do what you want to do, you could manually follow what is done in predict_y() [1].

    [1] https://github.com/GPflow/GPflow/blob/develop/gpflow/models/model.py#L201