Skip to content

Commit

Permalink
Merge pull request #70 from tink2123/check_gpu
Browse files Browse the repository at this point in the history
update check_gpu
  • Loading branch information
LDOUBLEV committed May 19, 2020
2 parents b34c1b3 + 6de43fb commit 4af8bd0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/rec/rec_chinese_lite_train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tools/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def set_paddle_flags(**kwargs):

# NOTE(paddle-dev): All of these flags should be
# set before `import paddle`. Otherwise, it would
# not take any effect.
# not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
Expand All @@ -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']
Expand Down

0 comments on commit 4af8bd0

Please sign in to comment.