From ac9c0eadc4e94ee5e58f7262f3d0103c3da85d4f Mon Sep 17 00:00:00 2001 From: Channingss Date: Thu, 14 Jan 2021 08:58:31 +0000 Subject: [PATCH] modify embeding weight --- x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py index 33bcdb9..f87ea2c 100644 --- a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py @@ -721,7 +721,7 @@ class OpSet9(): op_name = name_generator("embedding", self.nn_name2id) output_name = node.name layer_outputs = [op_name, output_name] - self.weights['.weight'] = _const_weight_or_none(val_x) + self.weights[op_name + '.weight'] = _const_weight_or_none(val_x) self.paddle_graph.add_layer( 'paddle.nn.Embedding', inputs={"x": indices_cast}, -- GitLab