XiaLiPKU / EMANet

The code for Expectation-Maximization Attention Networks for Semantic Segmentation (ICCV'2019 Oral)
https://xialipku.github.io/publication/expectation-maximization-attention-networks-for-semantic-segmentation/
GNU General Public License v3.0
680 stars 130 forks source link

No latest.pth! #11

Closed initbin closed 4 years ago

initbin commented 5 years ago

HI, Thanks for the great repo. I can not get latest.pth in training. What should I do?  error: ERROR - No checkpoint ./models/latest.pth! Thank you.

XiaLiPKU commented 5 years ago

I set the 'latest.pth' here for restore from previous checkpoints. Just imagine a situation your training is broken. Then the program autonomously loads the most recent checkpoint names 'latest.pth'. So at the beginning, there's no 'latest.pth', but it wouldn't influence your training

initbin commented 5 years ago

thanks your reply. The problem has been solved.

fdujay commented 5 years ago

thanks your reply. The problem has been solved.

Could you share your solution? I have met the same problem.

initbin commented 5 years ago

thanks your reply. The problem has been solved.

Could you share your solution? I have met the same problem.

as the author mentioned, it wouldn't influence your training. I found my real error as: RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight' I change the code in train.py/main: device = torch.device("cuda:0") loss = sess.train_batch(image.to(device), label.to(device)) another mistake is :"EMANet has no attribute module" my solution is : delete .module in code. hope to help you.