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

fix bug in 1.8.2

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