jwyang/faster-rcnn.pytorch

can't train with cpu only

Open

#323 aperta il 28 set 2018

Vedi su GitHub
 (18 commenti) (0 reazioni) (0 assegnatari)Python (2342 fork)batch import
help wanted

Metriche repository

Star
 (7454 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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?

Guida contributor