1013 update
This commit is contained in:
@ -105,6 +105,7 @@ def load_resources(wandb_exp_dir, device):
|
||||
config = wandb_style_config_to_omega_config(config)
|
||||
|
||||
# Load checkpoint to specified device
|
||||
print("Loading checkpoint from:", ckpt_path)
|
||||
ckpt = torch.load(ckpt_path, map_location=device)
|
||||
model, test_set, vocab = prepare_model_and_dataset_from_config(config, metadata_path, vocab_path)
|
||||
model.load_state_dict(ckpt['model'], strict=False)
|
||||
|
||||
Reference in New Issue
Block a user