提交 ae5a1811 编写于 作者: C Channingss

remove useless code

上级 fb61a10b
...@@ -590,7 +590,7 @@ class PaddleGraph(object): ...@@ -590,7 +590,7 @@ class PaddleGraph(object):
elif len(layer.outputs) == 2: elif len(layer.outputs) == 2:
line = layer.outputs[1] line = layer.outputs[1]
else: 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:])) line = "{}, ({})".format(layer.outputs[1], ', '.join(layer.outputs[-2:]))
else: else:
line = ','.join(layer.outputs[1:]) line = ','.join(layer.outputs[1:])
......
...@@ -611,8 +611,6 @@ class OpSet9(): ...@@ -611,8 +611,6 @@ class OpSet9():
layer_attrs = { layer_attrs = {
'num_features': node.out_shapes[0][1], 'num_features': node.out_shapes[0][1],
'epsilon': epsilon, 'epsilon': epsilon,
#'weight_attr': string(val_scale.name),
#'bias_attr': string(val_b.name)
} }
dim = len(val_x.out_shapes[0]) dim = len(val_x.out_shapes[0])
if dim == 3: if dim == 3:
...@@ -1333,10 +1331,6 @@ class OpSet9(): ...@@ -1333,10 +1331,6 @@ class OpSet9():
"momentum": momentum, "momentum": momentum,
"epsilon": epsilon, "epsilon": epsilon,
"is_test": True, "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, "use_global_stats": False,
} }
self.paddle_graph.add_layer( self.paddle_graph.add_layer(
...@@ -1402,7 +1396,6 @@ class OpSet9(): ...@@ -1402,7 +1396,6 @@ class OpSet9():
if mode == 'channel': if mode == 'channel':
slope_data = _const_weight_or_none(val_slope) slope_data = _const_weight_or_none(val_slope)
if len(shape_slope) > 1: 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]) self.weights[op_name+'._weight'] = np.reshape(slope_data, shape_slope[0])
num_parameters = val_x.out_shapes[0][1] num_parameters = val_x.out_shapes[0][1]
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册