提交 ae5a1811 编写于 作者: C Channingss

remove useless code

上级 fb61a10b
......@@ -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:])
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册