Skip to content

Commit

Permalink
Adding batch per epoch option to the finetune script (#10)
Browse files Browse the repository at this point in the history
* Adding batch per epoch option to the finetune script

Allow to specify the batch per epoch in the finetune script.

* Remove copy paste error :)
  • Loading branch information
daniel4x authored Jan 13, 2024
1 parent 33c6e6b commit a1a9caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ def test(cfg, model, test_data, device, logger, filtered_data=None, return_metri
val_filtered_data = val_filtered_data.to(device)
test_filtered_data = test_filtered_data.to(device)

train_and_validate(cfg, model, train_data, valid_data, filtered_data=val_filtered_data, device=device, logger=logger)
train_and_validate(cfg, model, train_data, valid_data, filtered_data=val_filtered_data, device=device, batch_per_epoch=cfg.train.batch_per_epoch, logger=logger)
if util.get_rank() == 0:
logger.warning(separator)
logger.warning("Evaluate on valid")
test(cfg, model, valid_data, filtered_data=val_filtered_data, device=device, logger=logger)
if util.get_rank() == 0:
logger.warning(separator)
logger.warning("Evaluate on test")
test(cfg, model, test_data, filtered_data=test_filtered_data, device=device, logger=logger)
test(cfg, model, test_data, filtered_data=test_filtered_data, device=device, logger=logger)

0 comments on commit a1a9caf

Please sign in to comment.