提交 f745dab4 编写于 作者: M mamingjie-China

fix bug in 1.8.2

上级 4af3caec
......@@ -864,8 +864,8 @@ class TFOptimizer(object):
weight = numpy.expand_dims(weight, 3)
self.op_mapper.weights[in_nodes3[0].layer_name] = weight
# fix bug in Paddle1.8.3 and may change in next version.
self.op_mapper.weights[in_nodes3[0].layer_name +
'_1'] = weight.reshape(1, -1)
# self.op_mapper.weights[in_nodes3[0].layer_name +
# '_1'] = weight.reshape(1, -1)
in_nodes3[0].fluid_code.layers[0].param_attr["shape"] = [
1, in_shape[-1], 1, 1
]
......@@ -888,7 +888,7 @@ class TFOptimizer(object):
node.fluid_code.clear()
attr = {
"mode": string(mode),
"param_attr": string(in_nodes3[0].layer_name + "_1")
"param_attr": string(in_nodes3[0].layer_name)
}
node.fluid_code.add_layer(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册