diff --git a/ppocr/modeling/architectures/rec_model.py b/ppocr/modeling/architectures/rec_model.py index 9f8c779cf27c71fd230bd70115795ff51ba6f63c..8bc5cb0e5502ae139a1ef54008c82e975fb211e1 100755 --- a/ppocr/modeling/architectures/rec_model.py +++ b/ppocr/modeling/architectures/rec_model.py @@ -160,6 +160,7 @@ class RecModel(object): "We set img_shape to be the same , it may affect the inference effect" ) image_shape = deepcopy(self.image_shape) + image_shape.insert(0, -1) image = fluid.data(name='image', shape=image_shape, dtype='float32') image.stop_gradient = False if self.loss_type == "srn":