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

Can't train the model? #12

Closed fdujay closed 4 years ago

fdujay commented 5 years ago

(base) davis@davis-MS-7B17:~/Network/EMANet-master$ python train.py 2019-08-31 13:50:14,703 - INFO - set log dir as ./logdir 2019-08-31 13:50:14,703 - INFO - set model dir as ./models 2019-08-31 13:50:17,131 - ERROR - No checkpoint ./models/latest.pth!

The Training step is stopped, so I have to Keyboard Interrupt it... Does anybody know how to solve it?

fdujay commented 5 years ago

I have met the other error: v = obj.cuda(dev, async=True) ^ SyntaxError: invalid syntax

Solving it by exchanging "async" by "non_blocking", because 'async' is a reserved word in Python >= 3.7

XiaLiPKU commented 5 years ago

(base) davis@davis-MS-7B17:~/Network/EMANet-master$ python train.py 2019-08-31 13:50:14,703 - INFO - set log dir as ./logdir 2019-08-31 13:50:14,703 - INFO - set model dir as ./models 2019-08-31 13:50:17,131 - ERROR - No checkpoint ./models/latest.pth!

The Training step is stopped, so I have to Keyboard Interrupt it... Does anybody know how to solve it?

As the GPUs are loading model sequentially, you may need to wait for around 20s, and then the training process will start.

XiaLiPKU commented 5 years ago

I have met the other error: v = obj.cuda(dev, async=True) ^ SyntaxError: invalid syntax

Solving it by exchanging "async" by "non_blocking", because 'async' is a reserved word in Python >= 3.7

v = obj.cuda(dev, async=True) is not included in my repo, and I haven't seed similar problems.