From fb3da5808b0d4b4e34cbb2b5aa7bb3b3c390f576 Mon Sep 17 00:00:00 2001 From: zhangxuefei Date: Tue, 26 Nov 2019 15:38:28 +0800 Subject: [PATCH] close pyreader --- demo/elmo/elmo_finetune.py | 1 + demo/elmo/predict.py | 1 + demo/senta/predict.py | 3 +-- demo/senta/senta_finetune.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/demo/elmo/elmo_finetune.py b/demo/elmo/elmo_finetune.py index e0f077c1..f39cd1ed 100644 --- a/demo/elmo/elmo_finetune.py +++ b/demo/elmo/elmo_finetune.py @@ -148,6 +148,7 @@ if __name__ == '__main__': config = hub.RunConfig( use_cuda=args.use_gpu, use_data_parallel=True, + use_pyreader=False, num_epoch=args.num_epoch, batch_size=args.batch_size, checkpoint_dir=args.checkpoint_dir, diff --git a/demo/elmo/predict.py b/demo/elmo/predict.py index 3fb9b714..c37e4aac 100644 --- a/demo/elmo/predict.py +++ b/demo/elmo/predict.py @@ -147,6 +147,7 @@ if __name__ == '__main__': config = hub.RunConfig( use_cuda=args.use_gpu, use_data_parallel=True, + use_pyreader=False, batch_size=args.batch_size, checkpoint_dir=args.checkpoint_dir, strategy=strategy) diff --git a/demo/senta/predict.py b/demo/senta/predict.py index 1c258343..dfb5017f 100644 --- a/demo/senta/predict.py +++ b/demo/senta/predict.py @@ -17,7 +17,6 @@ import paddlehub as hub parser = argparse.ArgumentParser(__doc__) parser.add_argument("--checkpoint_dir", type=str, default=None, help="Directory to model checkpoint") parser.add_argument("--use_gpu", type=ast.literal_eval, default=True, help="Whether use GPU for finetuning, input should be True or False") -parser.add_argument("--use_pyreader", type=ast.literal_eval, default=False, help="Whether use pyreader to feed data.") args = parser.parse_args() # yapf: enable. @@ -40,7 +39,7 @@ if __name__ == '__main__': config = hub.RunConfig( use_data_parallel=False, - use_pyreader=args.use_pyreader, + use_pyreader=False, use_cuda=args.use_gpu, batch_size=1, enable_memory_optim=False, diff --git a/demo/senta/senta_finetune.py b/demo/senta/senta_finetune.py index 8af5a720..49eaa171 100644 --- a/demo/senta/senta_finetune.py +++ b/demo/senta/senta_finetune.py @@ -39,6 +39,7 @@ if __name__ == '__main__': num_epoch=args.num_epoch, batch_size=args.batch_size, checkpoint_dir=args.checkpoint_dir, + use_pyreader=False, strategy=strategy) # Define a classfication finetune task by PaddleHub's API -- GitLab