提交 9ef53205 编写于 作者: S Steffy-zxf 提交者: wuzewu

close pyreader (#236)

* close pyreader in senta and elmo demo
上级 2a5721af
......@@ -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,
......
......@@ -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)
......
......@@ -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,
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册