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

Why are the three weights stored? #2

Open
LimChaeYeon1003 opened this issue Apr 25, 2022 · 2 comments
Open

Why are the three weights stored? #2

LimChaeYeon1003 opened this issue Apr 25, 2022 · 2 comments

Comments

@LimChaeYeon1003
Copy link

After completing the learning,
three weights are stored: ema, optimizer, and model.
Do we need all of this for testing? Where should I add it if necessary?

@Theodore-PKU
Copy link
Owner

Optimizer and model are stored because we may use them to train more steps.
ema is the average of models in the training process.
After training, model and ema are both able to be used for reconstruction (only use one of them).
In my experiment, using model is better.
Use kspace_test.py to run the model for reconstruction by adding --resume_checkpoint modelxxxxxx.pt. More detail can be seen in mri_recon_utils/kspace_script_util.py where all args needed are.

@LimChaeYeon1003
Copy link
Author

LimChaeYeon1003 commented Apr 25, 2022

Optimizer and model are stored because we may use them to train more steps. ema is the average of models in the training process. After training, model and ema are both able to be used for reconstruction (only use one of them). In my experiment, using model is better. Use kspace_test.py to run the model for reconstruction by adding --resume_checkpoint modelxxxxxx.pt. More detail can be seen in mri_recon_utils/kspace_script_util.py where all args needed are.

Good understanding. Thank you for answer

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

2 participants