rgeirhos / Stylized-ImageNet

Code to create Stylized-ImageNet, a stylized version of standard ImageNet (ICLR 2019 Oral)
https://openreview.net/forum?id=Bygh9j09KX
MIT License
506 stars 63 forks source link

Issue with RuntimeError in Stylized-ImageNet Preprocessing #22

Closed SHIBOYA closed 10 months ago

SHIBOYA commented 10 months ago

I hope this message finds you well. I am writing to seek your assistance with an issue I've encountered while using your Stylized-ImageNet code, specifically during the preprocessing of ImageNet validation data.

I am encountering a runtime error in the preprocessing script (preprocess_imagenet.py). The error occurs at the point of applying transformations to the input data. Here is the traceback for your reference:

Preprocessing validation data:
content.shape torch.Size([1, 3, 224, 224])
Traceback (most recent call last):
  File "preprocess_imagenet.py", line 211, in <module>
    main()
  File "preprocess_imagenet.py", line 129, in main
    targetdir = os.path.join(g.STYLIZED_IMAGENET_PATH, "val/"))
  File "preprocess_imagenet.py", line 166, in preprocess
    input = transform(input)
  File "/home/Stylized-ImageNet-master/code/adain.py", line 75, in get_style_tensor_function
    content_tensor = content_tensor)
  File "/home/Stylized-ImageNet-master/code/adain.py", line 195, in transfer_tensor_to_tensor
    output_to_cpu = output_to_cpu)
  File "/home/Stylized-ImageNet-master/code/adain.py", line 216, in transfer_single_style
    alpha = self.args.alpha).data
  File "/home/Stylized-ImageNet-master/code/adain.py", line 240, in transfer_helper
    content_f = self.vgg(content)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py", line 67, in forward
    input = module(input)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py", line 282, in forward
    self.padding, self.dilation, self.groups)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 90, in conv2d
    return f(input, weight, bias)
RuntimeError: CUDNN_STATUS_EXECUTION_FAILED

The error seems to be related to the convolution operations in PyTorch, as suggested by the CUDNN_STATUS_EXECUTION_FAILED message. I am currently using PyTorch version 0.4.1 in a Python 3.6 environment.

I have attempted several troubleshooting steps, including [mention any specific steps you have taken, like checking CUDA/cuDNN versions, ensuring sufficient GPU memory, etc.]. However, the issue persists.

I would greatly appreciate any insights or suggestions you might have regarding this error. Your guidance would be invaluable in helping me resolve this issue and continue with my work using Stylized-ImageNet.

Thank you very much for your time and assistance. I look forward to hearing from you.

Best regards!

rgeirhos commented 10 months ago

This issue looks like it's been generated using a language model rather than a person ("[mention any specific steps you have taken, like checking CUDA/cuDNN versions, ensuring sufficient GPU memory, etc.]"). Closing.