We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e13b8f5 commit d50177fCopy full SHA for d50177f
torchvision/models/detection/transform.py
@@ -31,8 +31,10 @@ def _resize_image_and_masks(
31
) -> Tuple[Tensor, Optional[Dict[str, Tensor]]]:
32
if torchvision._is_tracing():
33
im_shape = _get_shape_onnx(image)
34
- else:
+ elif torch.jit.is_scripting():
35
im_shape = torch.tensor(image.shape[-2:])
36
+ else:
37
+ im_shape = image.shape[-2:]
38
39
size: Optional[List[int]] = None
40
scale_factor: Optional[float] = None
0 commit comments