jwyang/faster-rcnn.pytorch

can't train with cpu only

Open

#323 opened on Sep 28, 2018

View on GitHub
 (18 comments) (0 reactions) (0 assignees)Python (7,454 stars) (2,342 forks)batch import
help wanted

Description

Because of some certain reason, I want to train the model with small data on a PC with no GPU. But Python gave me an AssertionError as I found here.

Traceback (most recent call last):
  File "/home/snowyjune/local/faster-rcnn.pytorch/faster-rcnn.pytorch/trainval_net.py", line 336, in <module>
    loss.backward()

  File "/home/snowyjune/anaconda3/lib/python3.6/site-packages/torch/tensor.py", line 93, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)

  File "/home/snowyjune/anaconda3/lib/python3.6/site-packages/torch/autograd/__init__.py", line 89, in backward
    allow_unreachable=True)  # allow_unreachable flag

  File "/home/snowyjune/local/faster-rcnn.pytorch/faster-rcnn.pytorch/lib/model/roi_align/functions/roi_align.py", line 38, in backward
    assert((self.feature_size is not None) and (grad_output.is_cuda))

AssertionError

It seems that the program is designed not to support training with CPU. Is that true?

Contributor guide