Skip to content

Commit 110d998

Browse files
committed
replace .type() with .options() for tensor initialization in ROIAlign layers
1 parent d3dc4a1 commit 110d998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/csrc/cpu/ROIAlign_cpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ at::Tensor ROIAlign_forward_cpu(const at::Tensor& input,
362362
auto height = input.size(2);
363363
auto width = input.size(3);
364364

365-
at::Tensor output = at::zeros({num_rois, channels, pooled_height, pooled_width}, input.type());
365+
at::Tensor output = at::zeros({num_rois, channels, pooled_height, pooled_width}, input.options());
366366

367367
auto output_size = num_rois * pooled_height * pooled_width * channels;
368368

0 commit comments

Comments
 (0)