We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 059ed3d commit 0e0cf56Copy full SHA for 0e0cf56
eval.py
@@ -1,3 +1,4 @@
1
+import torch
2
import logging
3
from pytorch_lightning import Trainer
4
from argparse import ArgumentParser
@@ -8,7 +9,11 @@
8
9
10
def main(hparams):
11
# init module
- model = AffWild2VA(hparams).load_from_checkpoint(hparams.checkpoint)
12
+ model = AffWild2VA(hparams)
13
+ # make it easier for us to add new params
14
+ checkpoint = torch.load(hparams.checkpoint, map_location=lambda storage, loc: storage)
15
+ model.load_state_dict(checkpoint['state_dict'])
16
+ print ('Loaded pretrained weights')
17
18
trainer = Trainer(
19
gpus=hparams.gpus,
0 commit comments