2

I am trying to save a GPflow model (in GPflow version 2.0).

model = gpflow.models.VGP((X, Y_data), kernel=kernel, likelihood=likelihood, num_latent_gps=1)

Since the gpflow package no longer has a saver module, could anyone help me with an alternative way?

STJ
  • 1,478
  • 7
  • 25
fsrfyama
  • 325
  • 2
  • 13

1 Answers1

5

There are different ways of saving a GPflow model and the way to do it will depend on your use-case. You can either use TensorFlow's checkpointing (saving the trained weights) or use TensorFlow's SavedModel format (saving weights and parts of the computational graph). You can see examples of both approaches in the intro to GPflow2 notebook.

STJ
  • 1,478
  • 7
  • 25
  • 1
    Your link seems to be broken. An updated link could be: https://gpflow.github.io/GPflow/2.5.2/notebooks/intro_to_gpflow2.html#Saving-and-loading-models – Jesper Nielsen Jul 06 '22 at 15:40
  • The solution in link does not loads an object equivalent to the saved model – JuanPi Dec 13 '22 at 15:39