pytorch/vision

windows maskrcnn error: unresolved external symbol "class at::Tensor __cdecl nms_cpu(class at::Tensor const &,class at::Tensor const &,float)" (?nms_cpu@@YA?AVTensor@at@@AEBV12@0M@Z)

Open

#2,139 创建于 2020年4月24日

在 GitHub 查看
 (22 评论) (0 反应) (0 负责人)Python (15,050 star) (6,858 fork)batch import
help wantedmodule: c++ frontendmodule: opswindows

描述

I built torchvision pulled from master using :

cmake -DCMAKE_PREFIX_PATH=D:/Garage/onnx-deploy/libtorchd  -DCMAKE_INSTALL_PREFIX=D:/vision/Debug -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug 
cmake --install .

Then torch.jit.script(model) and saved mask-rcnn model from torchvision. Errors occured in my C++ project, firstly Unknown builtin op: torchvision::_new_empty_tensor_op, then I modified my code according to #1407, added lines like #include "torchvision/nms.h" and torch::RegisterOperators().op("torchvision::nms", &nms) , but it won't work. The error became unresolved external symbol "class at::Tensor __cdecl nms_cpu(class at::Tensor const &,class at::Tensor const &,float)" (?nms_cpu@@YA?AVTensor@at@@AEBV12@0M@Z). The libtorch version is 1.5.0 and torchvision is pulled from master yesterday. Any clue how I can get mask rcnn running? Similar issues are many but little to help, I really get confused about how to modify CMakeList.txt of TorchVision.

cc @peterjc123 @nbcsm @guyang3532 @maxluk @gunandrose4u @smartcat2010 @mszhanyi

贡献者指南