Skip to content

Commit

Permalink
Update single node learning with pretrained fetched model
Browse files Browse the repository at this point in the history
  • Loading branch information
etzinis committed Apr 16, 2021
1 parent 1f68383 commit 71c151f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
else:
raise ValueError('Invalid model: {}.'.format(hparams['model_type']))

# Load the pre-trained model if it is given.
if hparams['warmup_checkpoint'] is not None:
model.load_state_dict(
torch.load(hparams['warmup_checkpoint']))

numparams = 0
for f in model.parameters():
if f.requires_grad:
Expand Down

0 comments on commit 71c151f

Please sign in to comment.