Closed Worker-Hou closed 5 months ago
Which part of the code should be changed?
The init section of the Trainer class. When you have gotten a model, and then you can load the previous weight.
The init section of the Trainer class. When you have gotten a model, and then you can load the previous weight.
Sorry, I tried to call the (load_state_dict) method in the (init) function of (Trainer) in (Trainer. But still not from the previously trained weight part to continue training. Please tell me how you modified this part of the code, thank you very much!
After you have a model, you can call the load_state_dict() function to load the previous parameters.
After you have a model, you can call the load_state_dict() function to load the previous parameters.
Thank you for your reply. I have solved the problem. This may have been because every time I called the previous weight file, the Epoch number would start from 0 again, which made me think that it did not run successfully. However, I find that loss is the value of the previous pre-training weight, so it is successful for now! Thanks again for your reply!
Questions above, thank you for your answer!