lucasjinreal / DCNv2_latest

DCNv2 supports decent pytorch such as torch 1.5+ (now 1.8+)
BSD 3-Clause "New" or "Revised" License
614 stars 125 forks source link

BUG: dcn_v2_cpu_forward #20

Open delldu opened 3 years ago

delldu commented 3 years ago

Dear friend, I check function dcn_v2_cpu_forward, think the following code is wrong: auto ones_T = at::transpose(ones.contiguous(), 2, 0); ones_T = at::mul(ones_T, bias.contiguous()); ones_T = at::transpose(ones_T, 2, 0); output_n = at::add(output_n, ones_T); Because: ones is 2 dimension data with auto ones = at::ones({ height_out, width_out }, input.options()); So cpu code does not work. Would you please kindly check it ?

lucasjinreal commented 3 years ago

@delldu Honestly I didn't tested CPU version. Welcome send me PR if you got a chance to fix it.