RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non*

Traceback (most recent call last):
  File "train_four_classes.py", line 164, in <module>
    best_weight_auc = eval_model(model, epoch_start, eval_loader)
  File "train_four_classes.py", line 54, in eval_model
    class_output = model(img)
  File "/home/chenby/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/data1/cby/py_project/ALASKA2/network/model.py", line 188, in forward
    x = self.model(x)
  File "/home/chenby/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/chenby/anaconda3/envs/py36/lib/python3.6/site-packages/torchvision/models/resnet.py", line 196, in forward
    x = self.conv1(x)
  File "/home/chenby/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/chenby/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 345, in forward
    return self.conv2d_forward(input, self.weight)
  File "/home/chenby/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 342, in conv2d_forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.

环境:ubuntu + cuda10.0 + py3.6 +( torch 1.2+cuda9.2)
我我的batch_size一开始为128, 然后通过降低batch_size=64就不出现问题。


版权声明:本文为qq_36213248原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。