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

RuntimeError: Expected object of type Variable but found type CUDAType for argument #0 'result' (checked_cast_variable at /opt/conda/conda-bld/pytorch-nightly_1557983258128/work/torch/csrc/autograd/VariableTypeManual.cpp:173) #104

Open
xjiao004 opened this issue May 17, 2019 · 3 comments

Comments

@xjiao004
Copy link

RuntimeError: Expected object of type Variable but found type CUDAType for argument #0 'result' (checked_cast_variable at /opt/conda/conda-bld/pytorch-nightly_1557983258128/work/torch/csrc/autograd/VariableTypeManual.cpp:173)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x45 (0x7f5fc2d109a5 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: torch::autograd::VariableType::checked_cast_variable(at::Tensor&, char const*, int) + 0x13a (0x7f5fc5c5ab8a in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #2: torch::autograd::VariableType::unpack(at::Tensor&, char const*, int) + 0x9 (0x7f5fc5c5af19 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #3: torch::autograd::VariableType::s__th_gt_out(at::Tensor&, at::Tensor const&, at::Tensor const&) const + 0x299 (0x7f5fc596cdf9 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #4: at::TypeDefault::_th_gt_out(at::Tensor&, at::Tensor const&, at::Tensor const&) const + 0x205 (0x7f5fc40f29e5 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #5: at::TypeDefault::gt_out(at::Tensor&, at::Tensor const&, at::Tensor const&) const + 0x62 (0x7f5fc40d1222 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #6: torch::autograd::VariableType::gt_out(at::Tensor&, at::Tensor const&, at::Tensor const&) const + 0x37a (0x7f5fc5a1958a in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #7: pool_backward(at::Tensor, at::Tensor) + 0x5b2 (0x7f5fa61456d2 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg/right_pool.cpython-36m-x86_64-linux-gnu.so)
frame #8: + 0x13b26 (0x7f5fa6151b26 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg/right_pool.cpython-36m-x86_64-linux-gnu.so)
frame #9: + 0x13c6e (0x7f5fa6151c6e in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg/right_pool.cpython-36m-x86_64-linux-gnu.so)
frame #10: + 0x11ac1 (0x7f5fa614fac1 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg/right_pool.cpython-36m-x86_64-linux-gnu.so)

frame #23: torch::autograd::PyFunction::apply(std::vector<torch::autograd::Variable, std::allocatortorch::autograd::Variable >&&) + 0x193 (0x7f5ff3028f73 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #24: + 0x2d0d200 (0x7f5fc5c38200 in /home/dl/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #25: torch::autograd::Engine::evaluate_function(torch::autograd::FunctionTask&) + 0x385 (0x7f5fc5c322a5 in /home/dl/anaconda3/envs/CenterNet/lib/python

My Env:
Pytorch 1.1.0
Cuda 10.1
gcc 5.4

@xjiao004 xjiao004 changed the title cpools-0.0.0-py3.6-linux-x86_64.egg/top_pool.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail36_typeMetaDataInstance_preallocated_7E RuntimeError: Expected object of type Variable but found type CUDAType for argument #0 'result' (checked_cast_variable at /opt/conda/conda-bld/pytorch-nightly_1557983258128/work/torch/csrc/autograd/VariableTypeManual.cpp:173) May 17, 2019
@yuesongtian
Copy link

Same problem.

Have you found solution?

@heilaw
Copy link
Collaborator

heilaw commented May 29, 2019

This repo only supports PyTorch 0.4.1.

@chenjianyi
Copy link

Using the _cpools layer in CornerNet-Lite works for me. Just replace it and setup again.
https://github.com/princeton-vl/CornerNet-Lite/tree/master/core/models/py_utils/_cpools
Thanks!

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

4 participants