CenterNet: CuDNN error: CUDNN_STATUS_SUCCESS

Traceback (most recent call last):
  File "demo.py", line 56, in <module>
    demo(opt)
  File "demo.py", line 49, in demo
    ret = detector.run(image_name)
  File "/workspace/midhilesh/CenterNet/src/lib/detectors/base_detector.py", line 116, in run
    output, dets, forward_time = self.process(images, return_time=True)
  File "/workspace/midhilesh/CenterNet/src/lib/detectors/ctdet.py", line 30, in process
    output = self.model(images)[-1]
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/workspace/midhilesh/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 471, in forward
    x = self.base(x)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/workspace/midhilesh/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 288, in forward
    x = self.base_layer(x)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward
    input = module(input)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 301, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: CuDNN error: CUDNN_STATUS_SUCCESS

I got this error while using the demo file. Can anyone please help me with this problem?

I used Pytorch 0.4.1, CUDA 9.0.176

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

fobidden cudnn in code

`import torch

torch.backends.cudnn.enabled=False`

@sh7jacobi Thank you for your answer. After further investigation, it seems that torch.backends.cudnn.benchmark = True did the trick 😃 Apparently it ‘optimizes’ CuDNN somehow, don’t really understand how thought. If someone have an idea how it works, don’t hesitate to give a quick explanation. Have a good day.