Skip to content

Commit

Permalink
train.py: fix weights_path check for pretrained model
Browse files Browse the repository at this point in the history
see PR #44
  • Loading branch information
linakrisztian committed Jul 28, 2023
1 parent 018769f commit e1f7462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ def train(model, train_generator, val_generator, id2code, batch_size,
args = parser.parse_args()

# check required arguments by individual operations
if args.operation == 'fine-tune' and args.model_path is None:
if args.operation == 'fine-tune' and args.weights_path is None:
raise parser.error(
'Argument model_path required for operation == fine-tune')
'Argument weights_path required for operation == fine-tune')
if args.operation == 'train' and args.initial_epoch != 0:
raise parser.error(
'Argument initial_epoch must be 0 for operation == train')
Expand Down

1 comment on commit e1f7462

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.