未验证 提交 cf4a4154 编写于 作者: Z zhoujun 提交者: GitHub

fix image_shape error when tps in model and char_type is ch (#1290)

上级 0007e4ee
...@@ -160,6 +160,7 @@ class RecModel(object): ...@@ -160,6 +160,7 @@ class RecModel(object):
"We set img_shape to be the same , it may affect the inference effect" "We set img_shape to be the same , it may affect the inference effect"
) )
image_shape = deepcopy(self.image_shape) image_shape = deepcopy(self.image_shape)
image_shape.insert(0, -1)
image = fluid.data(name='image', shape=image_shape, dtype='float32') image = fluid.data(name='image', shape=image_shape, dtype='float32')
image.stop_gradient = False image.stop_gradient = False
if self.loss_type == "srn": if self.loss_type == "srn":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册