update check_gpu

This commit is contained in:
tink2123 2020-05-19 17:30:22 +08:00
parent e884da9ebe
commit 6de43fbb47
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ Global:
character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt
loss_type: ctc
reader_yml: ./configs/rec/rec_chinese_reader.yml
pretrain_weights: ./pretrain_models/CRNN/best_accuracy
pretrain_weights:
checkpoints:
save_inference_dir:
Architecture:

View File

@ -51,7 +51,7 @@ def main():
# check if set use_gpu=True in paddlepaddle cpu version
use_gpu = config['Global']['use_gpu']
program.check_gpu(True)
program.check_gpu(use_gpu)
alg = config['Global']['algorithm']
assert alg in ['EAST', 'DB', 'Rosetta', 'CRNN', 'STARNet', 'RARE']

View File

@ -52,7 +52,7 @@ def main():
# check if set use_gpu=True in paddlepaddle cpu version
use_gpu = config['Global']['use_gpu']
program.check_gpu(True)
program.check_gpu(use_gpu)
alg = config['Global']['algorithm']
assert alg in ['EAST', 'DB', 'Rosetta', 'CRNN', 'STARNet', 'RARE']