Skip to content

Commit

Permalink
Fix folder hierarchy for footsteps
Browse files Browse the repository at this point in the history
  • Loading branch information
Basar Demir committed Oct 29, 2024
1 parent f78e27f commit f2e870f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions training/train_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,14 @@ def finetune(net, data_loader, val_data_loader, GPUS, epochs, eval_period, save_

net_par.train()

footsteps.output_dir_impl = footsteps.output_dir + "finetune/"
footsteps.output_dir_impl = footsteps.output_dir.split("2nd_step/")[0] + "finetune/"
os.makedirs(footsteps.output_dir + "checkpoints", exist_ok=True)

train(net_par, optimizer, data_loader, val_data_loader, unwrapped_net=net, epochs=epochs, eval_period=eval_period, save_period=save_period, data_augmenter=augment)

torch.save(
net.regis_net.state_dict(),
footsteps.output_dir + "checkpoints/Step_2_final.trch",
footsteps.output_dir + "checkpoints/finetune_final.trch",
)

if __name__ == "__main__":
Expand Down Expand Up @@ -390,4 +390,7 @@ def finetune(net, data_loader, val_data_loader, GPUS, epochs, eval_period, save_
drop_last=True,
)

print("Finish data loading...")

print("Start finetuning...")
finetune(net, fine_dataloader, fine_val_dataloader, GPUS, 100, 20, 20)

0 comments on commit f2e870f

Please sign in to comment.