diff --git a/demo/elmo/elmo_finetune.py b/demo/elmo/elmo_finetune.py index e0f077c183b4671a15783fe0d61661a53ed263d4..f39cd1ed20618569b49e8e3727f67fe8ef55a093 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 3fb9b7140a06e16437f022e1e91d844a35769e05..c37e4aac6a878f84bb0eef683e6a0011b08cc418 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 1c258343a286d124a4fb70c551168fb1d4f0be22..dfb5017f54e93df18255961534f1b5b78afe81d3 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 8af5a720bfb44dbf20be3932913d418c15f49648..49eaa171fdcbcf7471553463622f2d33f8e680c8 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