diff --git a/x2paddle/core/program.py b/x2paddle/core/program.py index 5c945dfe45c2fae04d47d57f2e2e42b184c16e1a..f51fa1f74989a8c1812ccf48b21dc2e673d10ae6 100644 --- a/x2paddle/core/program.py +++ b/x2paddle/core/program.py @@ -590,7 +590,7 @@ class PaddleGraph(object): elif len(layer.outputs) == 2: line = layer.outputs[1] else: - if layer.kernel in ["paddle.nn.LSTM", 'custom_layer:LSTM']: + if layer.kernel in ["paddle.nn.LSTM"]: line = "{}, ({})".format(layer.outputs[1], ', '.join(layer.outputs[-2:])) else: line = ','.join(layer.outputs[1:]) diff --git a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py index bf31b2f98633fc689bab244850e4d1b61281d8f4..1344206cf409f4c49cc0b1b7f6dc9c43c35a5cf0 100644 --- a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py @@ -611,8 +611,6 @@ class OpSet9(): layer_attrs = { 'num_features': node.out_shapes[0][1], 'epsilon': epsilon, - #'weight_attr': string(val_scale.name), - #'bias_attr': string(val_b.name) } dim = len(val_x.out_shapes[0]) if dim == 3: @@ -1333,10 +1331,6 @@ class OpSet9(): "momentum": momentum, "epsilon": epsilon, "is_test": True, - #"param_attr": string(val_scale.name), - #"bias_attr": string(val_b.name), - #"moving_mean_name": string(val_mean.name), - #"moving_variance_name": string(val_var.name), "use_global_stats": False, } self.paddle_graph.add_layer( @@ -1402,7 +1396,6 @@ class OpSet9(): if mode == 'channel': slope_data = _const_weight_or_none(val_slope) if len(shape_slope) > 1: - #self.weights[val_slope.name] = np.reshape(slope_data, shape_slope[0]) self.weights[op_name+'._weight'] = np.reshape(slope_data, shape_slope[0]) num_parameters = val_x.out_shapes[0][1] else: