Loading VariationalSparseGP

Hi,

I have fit a bunch of VariationalSparseGP models to data (X, y) and saved the result with torch.save(vsgp.state_dict(), path). Now I would like to load that model again and make predictions on new data X'. From reading the docs, it is not obvious to me how I should go about doing this.

Do I need to reinitialize the vsgp from scratch (i.e. with the same X and y I input when I initialized it for training) and then do vsgp.load(path)? That doesn’t seem accurate to me, as I don’t need the training data anymore. But I don’t really know what to do besides that…

Thanks.

Hi @nomsa, I believe that you don’t have to reinitialize vsgp from scratch. Could you check if you have the same parameters of VSGP before and after using torch.load?