CornerNet
CornerNet copied to clipboard
[W Indexing.cu:937] Warning: masked_fill_ received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead. (function masked_fill__cuda)
I meet these warning when i train the network. [W IndexingUtils.h:30] Warning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (function expandTensors) [W Resize.cpp:23] Warning: An output with one or more elements was resized since it had shape [1884], which does not match the required output shape [1682].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (function resize_output_check) [W IndexKernel.cu:456] Warning: masked_scatter_ received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead. (function masked_scatter__cuda) [W Indexing.cu:937] Warning: masked_fill_ received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead. (function masked_fill__cuda)
I meet the same question, have you solved it?
I met the same warnings.
The solution to the warnings about masked_fill_
and masked_scatter_
is princeton-vl/CornerNet-Lite#111.
The resize_output_check
is a warning to prevent incorrect resizing, as described in the FAQ and pytorch#41027. To explicitly allow it, add .resize_(0)
before the resize for four corner pools.
max_temp.resize_(0);
at::masked_select_out(max_temp, input_temp, gt_mask);
Both solutions require four files to be modified and recompiled.