Duankaiwen / CenterNet

Codes for our paper "CenterNet: Keypoint Triplets for Object Detection" .
MIT License
1.86k stars 384 forks source link

Compiling Corner Pooling Layers Error #136

Open ChenJiaDeYang opened 3 years ago

ChenJiaDeYang commented 3 years ago

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/top_pool.cpp: In function ‘std::vector top_pool_backward(at::Tensor, at::Tensor)’: src/top_pool.cpp:44:41: error: could not convert ‘at::CUDA((c10::ScalarType)6)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef}’ auto max_val = at::zeros(torch::CUDA(at::kFloat), {batch, channel, width});


src/top_pool.cpp:45:41: error: could not convert ‘at::CUDA((c10::ScalarType)4)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef<long int>}’
     auto max_ind = at::zeros(torch::CUDA(at::kLong),  {batch, channel, width});
                              ~~~~~~~~~~~^~~~~~~~~~~
src/top_pool.cpp:57:44: error: could not convert ‘at::CUDA((c10::ScalarType)0)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef<long int>}’
     auto gt_mask    = at::zeros(torch::CUDA(at::kByte),  {batch, channel, width});
                                 ~~~~~~~~~~~^~~~~~~~~~~
src/top_pool.cpp:58:44: error: could not convert ‘at::CUDA((c10::ScalarType)6)’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef {aka c10::ArrayRef<long int>}’
     auto max_temp   = at::zeros(torch::CUDA(at::kFloat), {batch, channel, width});
                                 ~~~~~~~~~~~^~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
zongyue-lu commented 3 years ago

Hi! Did you solve this problem? I met the exactly same thing too.