当前位置:网站首页>RuntimeError: cuDNN error: CUDNN_ STATUS_ NOT_ INITIALIZED

RuntimeError: cuDNN error: CUDNN_ STATUS_ NOT_ INITIALIZED

2022-07-06 12:03:00 Caojia xiaoyuanbao

cuda11 function pytorch Report errors

Traceback (most recent call last):
  File "train.py", line 220, in <module>
    main(args)
  File "train.py", line 89, in main
    train(model, args, train_loader, criterion, Hash_center, optimizer, epoch, two_loss_epoch)
  File "train.py", line 121, in train
    y = model(input)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 167, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 177, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply
    output.reraise()
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise
    raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
    output = module(*input, **kwargs)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/mnt/caojie/workspace/Hadamard-Matrix-for-hashing/network.py", line 35, in forward
    x = self.feature_layers(x)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/container.py", line 119, in forward
    input = module(input)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 399, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/root/miniconda3/envs/mocov3/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 396, in _conv_forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED

resolvent :

pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

Reference link :https://stackoverflow.com/questions/66588715/runtimeerror-cudnn-error-cudnn-status-not-initialized-using-pytorch

原网站

版权声明
本文为[Caojia xiaoyuanbao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060913307445.html