If I only have one GPU, how to set the config.py?
See original GitHub issueThanks for your great project, it’s really helpful.
I only have one GPU, when I try to run the train.py
of the cityscapes.bisenet.R18, the following error occured:
Traceback (most recent call last): File “/home/oliver/PycharmProjects/TorchSeg/model/bisenet/cityscapes.bisenet.R18/train.py”, line 131, in <module> loss = model(imgs, gts) File “/home/oliver/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call result = self.forward(*input, **kwargs) File “/home/oliver/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py”, line 141, in forward return self.module(*inputs[0], **kwargs[0]) File “/home/oliver/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call result = self.forward(*input, **kwargs) File “/home/oliver/PycharmProjects/TorchSeg/model/bisenet/cityscapes.bisenet.R18/network.py”, line 77, in forward spatial_out = self.spatial_path(data) File “/home/oliver/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call result = self.forward(*input, **kwargs) File “/home/oliver/PycharmProjects/TorchSeg/model/bisenet/cityscapes.bisenet.R18/network.py”, line 133, in forward x = self.conv_7x7(x) File “/home/oliver/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call result = self.forward(*input, **kwargs) File “/home/oliver/PycharmProjects/TorchSeg/furnace/seg_opr/seg_oprs.py”, line 32, in forward x = self.bn(x) File “/home/oliver/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call result = self.forward(*input, **kwargs) File “/home/oliver/PycharmProjects/TorchSeg/furnace/seg_opr/sync_bn/syncbn.py”, line 50, in forward mean, inv_std = self._slave_pipe.run_slave(_ChildMessage(xsum, xsqsum, N)) AttributeError: ‘NoneType’ object has no attribute ‘run_slave’
After reading this page, I’m wondering how to run this code on the single GPU.
Can you give me some tips? Thank you so much!!
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (2 by maintainers)
@XdpAreKid @zhixuanli I will change the source code to support the single-gpu version recently.
I just have one gpu too,I change the code like you said,but I have other errors
Please give me a hand.