From 1985fac4b0ec2790e83f2d1a043bf9169b033d21 Mon Sep 17 00:00:00 2001 From: francis2tm Date: Sun, 6 Aug 2023 03:47:40 +0100 Subject: [PATCH 1/2] bugfix: ReduceSumStaticAxes type correction --- onnx2torch/node_converters/reduce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnx2torch/node_converters/reduce.py b/onnx2torch/node_converters/reduce.py index 025b135e..6cad7102 100644 --- a/onnx2torch/node_converters/reduce.py +++ b/onnx2torch/node_converters/reduce.py @@ -155,7 +155,7 @@ def forward(self, input_tensor: torch.Tensor) -> torch.Tensor: # pylint: disabl self._axes = list(range(input_tensor.dim())) - return torch.sum(input_tensor, dim=self._axes, keepdim=self._keepdims) + return torch.sum(input_tensor, dim=tuple(self._axes), keepdim=bool(self._keepdims)) class OnnxReduceStaticAxes(nn.Module, OnnxToTorchModule): # pylint: disable=missing-class-docstring From 645c3bcaf22b6dd46f86db8e26e69fed4084d0f7 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 21 Aug 2023 16:14:10 +0000 Subject: [PATCH 2/2] added onnxruntime as dependency --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 871472b5..e42554ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ dependencies = [ 'onnx>=1.9.0', 'torch>=1.8.0', 'torchvision>=0.9.0', + 'onnxruntime>=1.15.1', ] [project.optional-dependencies]