提交 fb3da580 编写于 作者: Z zhangxuefei

close pyreader

上级 2a5721af
...@@ -148,6 +148,7 @@ if __name__ == '__main__': ...@@ -148,6 +148,7 @@ if __name__ == '__main__':
config = hub.RunConfig( config = hub.RunConfig(
use_cuda=args.use_gpu, use_cuda=args.use_gpu,
use_data_parallel=True, use_data_parallel=True,
use_pyreader=False,
num_epoch=args.num_epoch, num_epoch=args.num_epoch,
batch_size=args.batch_size, batch_size=args.batch_size,
checkpoint_dir=args.checkpoint_dir, checkpoint_dir=args.checkpoint_dir,
......
...@@ -147,6 +147,7 @@ if __name__ == '__main__': ...@@ -147,6 +147,7 @@ if __name__ == '__main__':
config = hub.RunConfig( config = hub.RunConfig(
use_cuda=args.use_gpu, use_cuda=args.use_gpu,
use_data_parallel=True, use_data_parallel=True,
use_pyreader=False,
batch_size=args.batch_size, batch_size=args.batch_size,
checkpoint_dir=args.checkpoint_dir, checkpoint_dir=args.checkpoint_dir,
strategy=strategy) strategy=strategy)
......
...@@ -17,7 +17,6 @@ import paddlehub as hub ...@@ -17,7 +17,6 @@ import paddlehub as hub
parser = argparse.ArgumentParser(__doc__) parser = argparse.ArgumentParser(__doc__)
parser.add_argument("--checkpoint_dir", type=str, default=None, help="Directory to model checkpoint") 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_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() args = parser.parse_args()
# yapf: enable. # yapf: enable.
...@@ -40,7 +39,7 @@ if __name__ == '__main__': ...@@ -40,7 +39,7 @@ if __name__ == '__main__':
config = hub.RunConfig( config = hub.RunConfig(
use_data_parallel=False, use_data_parallel=False,
use_pyreader=args.use_pyreader, use_pyreader=False,
use_cuda=args.use_gpu, use_cuda=args.use_gpu,
batch_size=1, batch_size=1,
enable_memory_optim=False, enable_memory_optim=False,
......
...@@ -39,6 +39,7 @@ if __name__ == '__main__': ...@@ -39,6 +39,7 @@ if __name__ == '__main__':
num_epoch=args.num_epoch, num_epoch=args.num_epoch,
batch_size=args.batch_size, batch_size=args.batch_size,
checkpoint_dir=args.checkpoint_dir, checkpoint_dir=args.checkpoint_dir,
use_pyreader=False,
strategy=strategy) strategy=strategy)
# Define a classfication finetune task by PaddleHub's API # 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.
先完成此消息的编辑!
想要评论请 注册