Skip to content

Question about model save strategy #15

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

Open
svjack opened this issue Mar 15, 2023 · 0 comments
Open

Question about model save strategy #15

svjack opened this issue Mar 15, 2023 · 0 comments

Comments

@svjack
Copy link

svjack commented Mar 15, 2023

The model save strategy in project defined by

            for i, l in enumerate(avg_loss):
                print(f"Unet {i} avg validation loss: ", l)
                if l < best_loss[i]:
                    best_loss[i] = l
                    with training_dir("state_dicts"):
                        model_path = f"unet_{i}_state_{timestamp}.pth"
                        torch.save(imagen.unets[i].state_dict(), model_path)

This may make an inconsistency when unet_0's loss decrease and unet_1 not
i.e. the final saved unet model come from two different model in different training stage.
Does this not have bad effect ?

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