Open ajie220209 opened 6 months ago
Hi, in our source code, it was tested by taking the best performing weights in the validation set. If you need to load the latest weights for testing at the end of each epoch in training, we suggest you to modify the code of train.py as needed.
嗨,在我们的源代码中,它是通过在验证集中获取性能最佳的权重来测试的。如果你需要在训练的每个周期结束时加载最新的权重进行测试,我们建议你根据需要修改 train.py 代码。
The main problem I'm facing is that in the training phase, a new result is obtained, which contains the best latest.pth weight file. However, in the test phase, the weight file generated in the training phase cannot be loaded. Instead, a new result is generated by itself and loaded. Because this latest result is not obtained through the training phase, no .pth weight file is generated, and finally a FileNotFoundError: [Errno 2] No such file or directory: error is reported. Consulting the information did not solve this problem.
Hello, author, I found that you resume_model = os.path.join(") in test.py, the path is blank, may I ask if this is correct? resume_model = os.path.join(checkpoint_dir, 'latest. pth'), I changed it to this, found that the test phase can not always load the latest. pth generated in the train phase, what should I do?