akamaster / pytorch_resnet_cifar10

Proper implementation of ResNet-s for CIFAR10/100 in pytorch that matches description of the original paper.
BSD 2-Clause "Simplified" License
1.22k stars 335 forks source link

What version of PyTorch was used? #10

Closed matejaputic closed 5 years ago

matejaputic commented 5 years ago

I tried running training with pytorch 1.0.0 and I got the following error, which I suspect is due to a runtime version mismatch. Which version of pytorch was this code developed under?

Traceback (most recent call last):
  File "trainer.py", line 303, in <module>
    main()
  File "trainer.py", line 134, in main
    train(train_loader, model, criterion, optimizer, epoch)
  File "trainer.py", line 183, in train
    output = model(input_var)
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 143, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 153, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 83, in parallel_apply
    raise output
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 59, in _worker
    output = module(*input, **kwargs)
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/localtmp/mp3t/Projects/doggett/pytorch_resnet_cifar10/resnet.py", line 110, in forward
    out = F.relu(self.bn1(self.conv1(x)))
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/localtmp/mp3t/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 320, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuda runtime error (11) : invalid argument at /opt/conda/conda-bld/pytorch_1544176307774/work/aten/src/THC/THCGeneral.cpp:405
akamaster commented 5 years ago

I have just updated all code to Pytorch 1.0