speedinghzl / pytorch-segmentation-toolbox

PyTorch Implementations for DeeplabV3 and PSPNet
MIT License
768 stars 167 forks source link

RuntimeError: CUDA Error encountered in <function CompiledLib.bn_mean_var_cuda at 0x7f46e5355730> #53

Closed Deeachain closed 4 years ago

Deeachain commented 4 years ago

File "train.py", line 256, in <module> main() File "train.py", line 220, in main preds = model(images) File "/home/dingcheng/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__ result = self.forward(*input, **kwargs) File "/home/dingcheng/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 121, in forward return self.module(*inputs[0], **kwargs[0]) File "/home/dingcheng/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__ result = self.forward(*input, **kwargs) File "/home/dingcheng/seg/pytorch-segmentation-toolbox-master/networks/pspnet.py", line 139, in forward x = self.relu1(self.bn1(self.conv1(x))) File "/home/dingcheng/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__ result = self.forward(*input, **kwargs) File "/home/dingcheng/seg/pytorch-segmentation-toolbox-master/libs/bn.py", line 184, in forward self.activation, self.slope) File "/home/dingcheng/seg/pytorch-segmentation-toolbox-master/libs/functions.py", line 183, in forward _check(_ext.bn_mean_var_cuda, x, mean, var) File "/home/dingcheng/seg/pytorch-segmentation-toolbox-master/libs/functions.py", line 16, in _check raise RuntimeError("CUDA Error encountered in {}".format(fn)) RuntimeError: CUDA Error encountered in <function CompiledLib.bn_mean_var_cuda at 0x7f46e5355730> Hello, I encountered the above error when running the code. I hope you can help me to answer the following

zhy788 commented 4 years ago

@Deeachain 学长你好,我在运行这个代码时也遇到了与你相同的问题,请问您是如何解决的。非常希望能得到您的答复。 File "train.py", line 215, in main preds = model(images) File "/home/hy/anaconda3/envs/pytorch3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, kwargs) File "/home/hy/anaconda3/envs/pytorch3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 121, in forward return self.module(*inputs[0], *kwargs[0]) File "/home/hy/anaconda3/envs/pytorch3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(input, kwargs) File "/home/hy/workspace/code/pytorch-segmentation-toolbox-master/networks/pspnet.py", line 139, in forward x = self.relu1(self.bn1(self.conv1(x))) File "/home/hy/anaconda3/envs/pytorch3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home/hy/workspace/code/pytorch-segmentation-toolbox-master/libs/bn.py", line 184, in forward self.activation, self.slope) File "/home/hy/workspace/code/pytorch-segmentation-toolbox-master/libs/functions.py", line 183, in forward _check(_ext.bn_mean_var_cuda, x, mean, var) File "/home/hy/workspace/code/pytorch-segmentation-toolbox-master/libs/functions.py", line 16, in _check raise RuntimeError("CUDA Error encountered in {}".format(fn)) RuntimeError: CUDA Error encountered in <function CompiledLib.bn_mean_var_cuda at 0x7faca3aefb70>

Deeachain commented 4 years ago

Hi @zhy788 , 这是我去年尝试的代码,最终报错没能解决,目前我已经更换了一个关于语义分割的开源代码 你可以参考我现在整理的代码做实验 https://github.com/Deeachain/Segmentation-pytorch

zhy788 commented 4 years ago

@Deeachain 好的,非常感谢学长。