Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Prepare perceptual data] RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED #13

Open
zhhezhhe opened this issue Jan 15, 2020 · 1 comment

Comments

@zhhezhhe
Copy link

Thans for your great work!
When dataroot_LQ has only one image, the code runs OK!
But when I put more images (DIV2K dataset) to the dir of dataroot_LQ: /DIV2K/DIV2K_train_HR, the error occurs.

export CUDA_VISIBLE_DEVICES=4
20-01-15 19:31:02.816 - INFO:   name: DIV2K
  suffix: None
  model: sr
  distortion: sr
  scale: 4
  crop_border: None
  gpu_ids: [4]
  datasets:[
    test_1:[
      name: DIV2K_train_srres
      mode: LQ
      dataroot_GT: None
      dataroot_LQ: DIV2K/DIV2K_train_HR
      phase: test
      scale: 4
      data_type: img
    ]
  ]
  network_G:[
    which_model_G: SRResNet
    in_nc: 3
    out_nc: 3
    nf: 64
    nb: 16
    upscale: 4
    scale: 4
  ]
  path:[
    pretrain_model_G: ../experiments/pretrained_models/mmsr_RankSRGAN_NIQE.pth
    root: /RankSRGAN
    results_root: /RankSRGAN/results/DIV2K
    log: /RankSRGAN/results/DIV2K
  ]
  is_train: False

20-01-15 19:31:02.822 - INFO: Dataset [LQDataset - DIV2K_train_srres] is created.
20-01-15 19:31:02.822 - INFO: Number of test images in [DIV2K_train_srres]: 800
20-01-15 19:31:08.614 - INFO: Network G structure: DataParallel - SRResNet, with parameters: 1,554,499
20-01-15 19:31:08.615 - INFO: SRResNet(
  (conv_first): Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (recon_trunk): Sequential(
    (0): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (1): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (2): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (3): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (4): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (5): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (6): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (7): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (8): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (9): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (10): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (11): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (12): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (13): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (14): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    (15): ResidualBlock_noBN(
      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
  )
  (LRconv): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (upconv1): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (upconv2): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (pixel_shuffle): PixelShuffle(upscale_factor=2)
  (HRconv): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (conv_last): Conv2d(64, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (relu): ReLU(inplace)
)
20-01-15 19:31:08.615 - INFO: Loading model for G [../experiments/pretrained_models/mmsr_RankSRGAN_NIQE.pth] ...
20-01-15 19:31:08.625 - INFO: Model [SRModel] is created.
20-01-15 19:31:08.625 - INFO:
Testing [DIV2K_train_srres]...
Traceback (most recent call last):
  File "test.py", line 55, in <module>
    model.test()
  File "/RankSRGAN/codes/models/SR_model.py", line 102, in test
    self.fake_H = self.netG(self.var_L)
  File "/anaconda3/envs/pytorch_sr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/anaconda3/envs/pytorch_sr/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/anaconda3/envs/pytorch_sr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/RankSRGAN/codes/models/archs/RankSRGAN_arch.py", line 50, in forward
    out = self.relu(self.pixel_shuffle(self.upconv2(out)))
  File "/anaconda3/envs/pytorch_sr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/anaconda3/envs/pytorch_sr/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 338, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.
@zhhezhhe
Copy link
Author

The error occurs when I test Flickr2K/Flickr2K/000001.png. Its size is 2040*1356. When I test another image with a smaller size (some size like 680 * 680), the code runs OK.

@zhhezhhe zhhezhhe changed the title RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED [Prepare perceptual data] RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant