From b370e681cd64dbd26150a0bd2b4c98e5a287907f Mon Sep 17 00:00:00 2001 From: David Date: Thu, 29 Jul 2021 16:25:56 -0700 Subject: [PATCH] Import squeeze from symbolic_opset11 --- torchvision/ops/_register_onnx_ops.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torchvision/ops/_register_onnx_ops.py b/torchvision/ops/_register_onnx_ops.py index 8e8ed331803..e8dd90b4672 100644 --- a/torchvision/ops/_register_onnx_ops.py +++ b/torchvision/ops/_register_onnx_ops.py @@ -8,7 +8,8 @@ def _register_custom_op(): from torch.onnx.symbolic_helper import parse_args, scalar_type_to_onnx, scalar_type_to_pytorch_type, \ cast_pytorch_to_onnx - from torch.onnx.symbolic_opset9 import select, unsqueeze, squeeze, _cast_Long, reshape + from torch.onnx.symbolic_opset9 import _cast_Long + from torch.onnx.symbolic_opset11 import select, squeeze, unsqueeze @parse_args('v', 'v', 'f') def symbolic_multi_label_nms(g, boxes, scores, iou_threshold):