Fix path of pretrained model

This commit is contained in:
Marcin
2019-02-14 00:00:56 +01:00
parent 9d893e393b
commit b609951561
+1 -1
View File
@@ -214,7 +214,7 @@ class LMHyperParams:
learn.freeze()
if self.pretrained_fnames is not None:
print("Loading pretrained model")
fnames = [learn.path/learn.model_dir/f'{fn}.{ext}' for fn,ext in zip(self.pretrained_fnames, ['pth', 'pkl'])]
fnames = [f'{fn}.{ext}' for fn,ext in zip(self.pretrained_fnames, ['pth', 'pkl'])]
learn.load_pretrained(*fnames)
learn.freeze()
# compared to standard Adam, we set beta_1 to 0.8