diff --git a/fluid/ocr_recognition/.run_ce.sh b/fluid/ocr_recognition/.run_ce.sh index 202c5b483c8f35fd34a5cfa39c9ba11702a9bbd3..c306f310690bd137a91734174cfe55b1b9c2b71c 100755 --- a/fluid/ocr_recognition/.run_ce.sh +++ b/fluid/ocr_recognition/.run_ce.sh @@ -1,5 +1,4 @@ export ce_mode=1 -rm *factor.txt -python ctc_train.py --batch_size=32 --total_step=30000 --eval_period=30000 --log_period=30000 --use_gpu=True 1> ./tmp.log +python ctc_train.py --batch_size=32 --total_step=1 --eval_period=1 --log_period=1 --use_gpu=True 1> ./tmp.log cat tmp.log | python _ce.py rm tmp.log diff --git a/fluid/ocr_recognition/ctc_reader.py b/fluid/ocr_recognition/ctc_reader.py index a272e91a43684e62fdeab31d244989751b20fcc5..fcf9bd8c42ef42ee8ffcb6d89bb1847b5c469fcc 100644 --- a/fluid/ocr_recognition/ctc_reader.py +++ b/fluid/ocr_recognition/ctc_reader.py @@ -4,8 +4,8 @@ import tarfile import numpy as np from PIL import Image from os import path -from paddle.v2.image import load_image -import paddle.v2 as paddle +from paddle.dataset.image import load_image +import paddle NUM_CLASSES = 95 DATA_SHAPE = [1, 48, 512]