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

No pytorch models (.pth) saved during training? #11

Open
Rifahaziz opened this issue Feb 27, 2023 · 5 comments
Open

No pytorch models (.pth) saved during training? #11

Rifahaziz opened this issue Feb 27, 2023 · 5 comments

Comments

@Rifahaziz
Copy link

Hi, first of all this is excellent work! I am trying to test some data on the segmentation portion.
When I train it with pretained segformer weight, it saves data.pkl as checkpoints. It is not saving any .pth file. How am I supposed to evaluate it without any .pth file(pytorch model) generated during training? So question is, which 'path_to_pth ' path do you mean here "python main.py --gpu 0 --resume path_to_pth --evaluate" as during training no ".pth" file is generated. Am I supposed to convert the data.pkl to .pth here?
Moreover, what was the total training time in a single gpu with B3 segformer weight?
Thank you!

@yikaiw
Copy link
Owner

yikaiw commented Feb 28, 2023

Hi, you may not convert data.pkl to .pth. You can follow https://wandb.ai/wandb/common-ml-errors/reports/How-to-Save-and-Load-Models-in-PyTorch--VmlldzozMjg0MTE for saving .pth file.

The total training time in a single gpu with B3 segformer weight is about 1~2 days.

@CE-AI
Copy link

CE-AI commented Mar 24, 2023

which path should i reference? Or I need to retrain the model and set a path to save.
824ab829ccd493ddc8aa2b945928098
Looking foreward to ur answering! Thanks!

@Rifahaziz
Copy link
Author

It was the model-best.pth.tar that worked for me after retraining. Originally it was not working, maybe because I stopped the training midway. I hope this helps.

@CE-AI
Copy link

CE-AI commented Mar 24, 2023

i will try it later. Thanks!

@HarrisCheNN
Copy link

model-best.pth.tar can't be unzipped correctly,I may have same problem with you ,and I never stopped the training midway,it's a bug I suppose

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

4 participants