Open peacej opened 2 years ago
Hello! What model did you pass to the experiment
?
Nevermind, it works with:
from experiment import VAEXperiment
import yaml
import torch
from models import *
config = yaml.safe_load(open('./configs/bbvae.yaml'))
model = vae_models[config['model_params']['name']](**config['model_params'])
ckpt = torch.load('./logs/BetaVAE/version_0/checkpoints/last.ckpt')
experiment = VAEXperiment(model, config['exp_params'])
experiment.load_state_dict(ckpt['state_dict'])
where I used the BetaVAE
model.
For example I guess this is one way?
Then one can access the model via
experiment.model
It took me a while to figure this out. Maybe add such instructions to the README?