diff --git a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py index 33bcdb9d5dd56255fb4698eef0c442c2621298b6..f87ea2c7c78e484f4601c7aa89340f6ea8ab2c68 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},