Skip to content

Commit

Permalink
fix evaluate.py load model
Browse files Browse the repository at this point in the history
  • Loading branch information
张兆阳 authored and 张兆阳 committed Dec 10, 2021
1 parent 3f47e17 commit e7e461f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def main_worker():
model = net.InpaintGenerator().to(device)
model_path = args.ckpt
data = torch.load(args.ckpt, map_location=device)
model.load_state_dict(data['netG'])
model.load_state_dict(data)
print('loading from: {}'.format(args.ckpt))
model.eval()

Expand Down

0 comments on commit e7e461f

Please sign in to comment.