Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxtyrdd committed Aug 29, 2023
1 parent 44f5ad4 commit ddea063
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ def main(argv):
criterion = RateDistortionLoss(lmbda=config.train_lambda)

if config.test_only:
if config.checkpoint is not None:
load_weights(net, config.checkpoint)
else:
if config.pretrained is not None:
load_weights(net, config.pretrained)
else:
raise ValueError("Please specify the checkpoint path for testing.")
test_loader = get_test_loader(config.eval_dataset_path)
test(net, criterion, test_loader, device, logger)

Expand Down

0 comments on commit ddea063

Please sign in to comment.