-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
RuntimeError: Not implemented on the CPU #546
Comments
Just run with CUDA simply then it solves: |
it works, thank you very much |
File "C:\Veena\faster-rcnn.pytorch\lib\model\roi_layers\roi_align.py", line 41, in backward I am facing this issue |
$ python trainval_net.py arjun@LAPTOP-B7JENB0H MINGW64 /c/Veena/faster-rcnn.pytorch (pytorch-1.0) please help |
WO YE YUUDAO LE |
when I'm trying to run the file trainval_net, it returns an error: "RuntimeError: Not implemented on the CPU (ROIAlign_backward at /home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/csrc/ROIAlign.h:44)", what can I do to deal with this? Thanks a lot!
The whole outputs are as follow:
Loading pretrained weights from data/pretrained_model/resnet101_caffe.pth
Traceback (most recent call last):
File "/home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/trainval_net.py", line 329, in
loss.backward()
File "/home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/tensor.py", line 102, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/autograd/init.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
File "/home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/autograd/function.py", line 76, in apply
return self._forward_cls.backward(self, *args)
File "/home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/autograd/function.py", line 188, in wrapper
outputs = fn(ctx, args)
File "/home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/roi_layers/roi_align.py", line 41, in backward
sampling_ratio,
RuntimeError: Not implemented on the CPU (ROIAlign_backward at /home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/csrc/ROIAlign.h:44)
frame #0: std::function<std::string ()>::operator()() const + 0x11 (0x7f2000662fe1 in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x2a (0x7f2000662dfa in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libc10.so)
frame #2: ROIAlign_backward(at::Tensor const&, at::Tensor const&, float, int, int, int, int, int, int, int) + 0xfe (0x7f20543016ae in /home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/_C.so)
frame #3: + 0x1657f (0x7f205430e57f in /home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/_C.so)
frame #4: + 0x1667e (0x7f205430e67e in /home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/_C.so)
frame #5: + 0x12b32 (0x7f205430ab32 in /home/qxf/Documents/faster-rcnn.pytorch-pytorch-1.0/lib/model/_C.so)
frame #6: PyEval_EvalFrameEx + 0x5ca (0x4bc4aa in /home/qxf/PT1.0/bin/python)
frame #7: PyEval_EvalCodeEx + 0x306 (0x4b9b66 in /home/qxf/PT1.0/bin/python)
frame #8: /home/qxf/PT1.0/bin/python() [0x4d5669]
frame #9: PyObject_Call + 0x3e (0x4a587e in /home/qxf/PT1.0/bin/python)
frame #10: PyEval_EvalFrameEx + 0x263e (0x4be51e in /home/qxf/PT1.0/bin/python)
frame #11: PyEval_EvalCodeEx + 0x306 (0x4b9b66 in /home/qxf/PT1.0/bin/python)
frame #12: /home/qxf/PT1.0/bin/python() [0x4d5669]
frame #13: PyObject_Call + 0x3e (0x4a587e in /home/qxf/PT1.0/bin/python)
frame #14: PyEval_EvalFrameEx + 0x263e (0x4be51e in /home/qxf/PT1.0/bin/python)
frame #15: PyEval_EvalCodeEx + 0x306 (0x4b9b66 in /home/qxf/PT1.0/bin/python)
frame #16: /home/qxf/PT1.0/bin/python() [0x4d5669]
frame #17: /home/qxf/PT1.0/bin/python() [0x4eef5e]
frame #18: PyObject_Call + 0x3e (0x4a587e in /home/qxf/PT1.0/bin/python)
frame #19: PyEval_CallObjectWithKeywords + 0x30 (0x4c5ef0 in /home/qxf/PT1.0/bin/python)
frame #20: torch::autograd::PyFunction::apply(std::vector<torch::autograd::Variable, std::allocatortorch::autograd::Variable >&&) + 0x193 (0x7f203a992883 in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libtorch_python.so)
frame #21: torch::autograd::Engine::evaluate_function(torch::autograd::FunctionTask&) + 0x39e (0x7f1ffeff941e in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libtorch.so.1)
frame #22: torch::autograd::Engine::thread_main(torch::autograd::GraphTask) + 0xc0 (0x7f1ffeffb580 in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libtorch.so.1)
frame #23: torch::autograd::Engine::thread_init(int) + 0xc7 (0x7f1ffeff7e57 in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libtorch.so.1)
frame #24: torch::autograd::python::PythonEngine::thread_init(int) + 0x2a (0x7f203a98d31a in /home/qxf/PT1.0/local/lib/python2.7/site-packages/torch/lib/libtorch_python.so)
frame #25: + 0xb8c80 (0x7f204f44ac80 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6)
frame #26: + 0x76ba (0x7f2053fc06ba in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #27: clone + 0x6d (0x7f2053cf641d in /lib/x86_64-linux-gnu/libc.so.6)
The text was updated successfully, but these errors were encountered: