wurenkai / UltraLight-VM-UNet

[arXiv] The official code for "UltraLight VM-UNet: Parallel Vision Mamba Significantly Reduces Parameters for Skin Lesion Segmentation".
234 stars 33 forks source link

Test error #44

Open ajie220209 opened 6 months ago

ajie220209 commented 6 months ago

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?

wurenkai commented 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.

ajie220209 commented 6 months ago

嗨,在我们的源代码中,它是通过在验证集中获取性能最佳的权重来测试的。如果你需要在训练的每个周期结束时加载最新的权重进行测试,我们建议你根据需要修改 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.