RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED with Foolbox

username: jS5t3r
cooked: <p>I have installed</p>
<p>cudatoolkit           10.0.130                 0    anaconda<br>
cudnn                    7.6.5                    cuda10.0_0    anaconda<br>
torchvision             0.4.2                    py37_cu100    pytorch<br>
pytorch                  1.3.1                    py3.7_cuda10.0.130_cudnn7.6.3_0    pytorch<br>
foolbox                   2.3.0                    pypi_0    pypi</p>
<p>I get the following errors, when starting this project: <a href="https://github.com/jayaram-r/adversarial-detection" class="inline-onebox" rel="noopener nofollow ugc">GitHub - jayaram-r/adversarial-detection: Code and experiments for the adversarial detection paper</a></p>
<pre><code class="lang-python">&gt; python generate_samples.py --aa FGSM
&lt;foolbox.attacks.iterative_projected_gradient.RandomStartProjectedGradientDescentAttack object at 0x7f9f97c29c50&gt;
Traceback (most recent call last):
  File "generate_samples.py", line 278, in &lt;module&gt;
    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 &lt;listcomp&gt;
    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
</code></pre>
<p>I cannot read from this error, what should I try to do?</p>

username: jS5t3r
cooked: <p>Well, I just used <code>conda search cudatoolkit</code> and picked a version with <code>cuda 10.1</code> instead of <code>10.0</code>.</p>

username: James456
cooked: <p>Thanks for sharing this info this is useful.</p>