From 8614aac892f0d8cda96a454efc38f87e4e920bf2 Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Mon, 6 Jun 2022 11:36:52 +0800 Subject: [PATCH] deal with comments --- x2paddle/op_mapper/onnx2paddle/opset9/opset.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py index fb2a2d9..abb725b 100755 --- a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py @@ -2583,14 +2583,11 @@ class OpSet9(): 1) == 1 else False layer_attrs["sorted"] = True if node.get_attr('sorted', 1) == 1 else False - is_k_attr = False k = _const_weight_or_none(val_k) if isinstance(k, (list, tuple, np.ndarray)): k = k[0] if k is not None: - is_k_attr = True layer_attrs["k"] = k - if is_k_attr: self.paddle_graph.add_layer( "paddle.topk", inputs={"x": val_x.name}, -- GitLab