From 381900662995c6e52eefc3cd91dd8b1c49edc389 Mon Sep 17 00:00:00 2001 From: Channingss Date: Thu, 14 Jan 2021 08:25:46 +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 f884c7d..f0f4502 100644 --- a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py @@ -721,11 +721,11 @@ 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.name) self.paddle_graph.add_layer( 'paddle.nn.Embedding', inputs={"x": indices_cast}, outputs=layer_outputs, - weight_attr=string(val_x.name), num_embeddings=val_x.out_shapes[0][0], embedding_dim=val_x.out_shapes[0][1]) else: -- GitLab