RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED with Foolbox

I have installed

cudatoolkit 10.0.130 0 anaconda
cudnn 7.6.5 cuda10.0_0 anaconda
torchvision 0.4.2 py37_cu100 pytorch
pytorch 1.3.1 py3.7_cuda10.0.130_cudnn7.6.3_0 pytorch
foolbox 2.3.0 pypi_0 pypi

I get the following errors, when starting this project: GitHub - jayaram-r/adversarial-detection: Code and experiments for the adversarial detection paper

> python generate_samples.py --aa FGSM
<foolbox.attacks.iterative_projected_gradient.RandomStartProjectedGradientDescentAttack object at 0x7f9f97c29c50>
Traceback (most recent call last):
  File "generate_samples.py", line 278, in <module>
    main()
  File "generate_samples.py", line 233, in main
    max_epsilon=max_epsilon
  File "/home/user/adversialml/src/src/submodules/adversarial-detection/expts/helpers/attacks.py", line 210, in foolbox_attack
    max_epsilon=max_epsilon
  File "/home/user/adversialml/src/src/submodules/adversarial-detection/expts/helpers/attacks.py", line 65, in foolbox_attack_helper
    binary_search=False, iterations=iterations, unpack=False)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/attacks/base.py", line 52, in __call__
    **kwargs,
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/batching.py", line 241, in run_parallel
    for _criterion, _distance, x, label in zip(criterion, distance, inputs, labels)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/batching.py", line 241, in <listcomp>
    for _criterion, _distance, x, label in zip(criterion, distance, inputs, labels)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/v1/adversarial.py", line 90, in __init__
    self._check_unperturbed()
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/adversarial.py", line 17, in _check_unperturbed
    super(Adversarial, self).forward_one(self._Adversarial__unperturbed)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/v1/adversarial.py", line 312, in forward_one
    predictions = self.__model.forward_one(x)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/models/base.py", line 205, in forward_one
    return np.squeeze(self.forward(x[np.newaxis]), axis=0)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/foolbox/models/pytorch.py", line 84, in forward
    predictions = self._model(inputs)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/user/adversialml/src/src/submodules/adversarial-detection/expts/nets/resnet.py", line 89, in forward
    out = F.relu(self.bn1(self.conv1(x)))
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 345, in forward
    return self.conv2d_forward(input, self.weight)
  File "/home/user/.conda/envs/detection/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 342, in conv2d_forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

I cannot read from this error, what should I try to do?

Well, I just used conda search cudatoolkit and picked a version with cuda 10.1 instead of 10.0.

Thanks for sharing this info this is useful.