From a6c820c7631fc173cfda659d99588c118cf13117 Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Thu, 12 May 2022 14:33:38 +0800 Subject: [PATCH] fixed for ci --- x2paddle/op_mapper/onnx2paddle/opset9/opset.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py index 084b3f8..e2d0e10 100755 --- a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py @@ -911,6 +911,13 @@ class OpSet9(): 'index': indices.name}, outputs=[node.name], axis=axis) + # deal with indice is scalar(0D) Tensor + if isinstance(indices_values, int) and len(val_x_shape) > 1: + self.paddle_graph.add_layer( + 'paddle.squeeze', + inputs={'x': node.name}, + outputs=[node.name], + axis=[axis]) else: # if val_x is DataNode, convert gather to embedding if axis == 0 and isinstance(val_x, ONNXGraphDataNode): -- GitLab