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

could run in one gpu #32

Closed biexiangduo closed 4 years ago

biexiangduo commented 4 years ago

(base) pf@pf-System-Product-Name:~/EMANet$ python train.py 2019-12-06 21:37:49,527 - INFO - set log dir as ./logdir 2019-12-06 21:37:49,528 - INFO - set model dir as ./models Traceback (most recent call last): File "train.py", line 181, in main() File "train.py", line 146, in main sess = Session(dt_split='trainaug') File "train.py", line 93, in init self.net = DataParallel(self.net, device_ids=settings.DEVICES) File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 131, in init _check_balance(self.device_ids) File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 18, in _check_balance dev_props = [torch.cuda.get_device_properties(i) for i in device_ids] File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 18, in dev_props = [torch.cuda.get_device_properties(i) for i in device_ids] File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/cuda/init.py", line 301, in get_device_properties raise AssertionError("Invalid device id") AssertionError: Invalid device id

zhangyuxin0 commented 4 years ago

settings.py DEVICES =list(range(0, 1)) then i can run(I'm not sure that's right)

XiaLiPKU commented 4 years ago

This is not designed to run on one gpu. To achieve the reported performance, the batch size is of significance, so never try running on just one gpu.

biexiangduo commented 4 years ago

This is not designed to run on one gpu. To achieve the reported performance, the batch size is of significance, so never try running on just one gpu.

yes ,you are right.time is everything.

biexiangduo commented 4 years ago

settings.py DEVICES =list(range(0, 1)) then i can run(I'm not sure that's right)

thank you for your reply.