Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issue about training proecss #62

Open
Hhankyangg opened this issue May 23, 2024 · 0 comments
Open

Some issue about training proecss #62

Hhankyangg opened this issue May 23, 2024 · 0 comments

Comments

@Hhankyangg
Copy link

The training code only uses the training set, and decides whether to save the model based on the loss of the training set. This is very strange. There is also the risk of being overfitting, right?

if average_loss < best_loss:
    best_loss = average_loss
    save_path = os.path.join(args.work_dir, "models", args.run_name, f"epoch{epoch+1}_sam.pth")
    state = {'model': model.float().state_dict(), 'optimizer': optimizer}
    torch.save(state, save_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant