未验证 提交 c5b3422b 编写于 作者: L littletomatodonkey 提交者: GitHub

add dali v3 (#412)

add dali
上级 baf8431a
......@@ -112,14 +112,14 @@ def main(args):
train_reader = Reader(config, 'train')()
train_dataloader.set_sample_list_generator(train_reader, place)
if config.validate:
valid_reader = Reader(config, 'valid')()
valid_dataloader.set_sample_list_generator(valid_reader, place)
if int(os.getenv("PADDLE_TRAINER_ID", 0)) == 0:
valid_reader = Reader(config, 'valid')()
valid_dataloader.set_sample_list_generator(valid_reader, place)
compiled_valid_prog = program.compile(config, valid_prog)
else:
import dali
train_dataloader = dali.train(config)
if config.validate and int(os.getenv("PADDLE_TRAINER_ID", 0)):
if config.validate:
if int(os.getenv("PADDLE_TRAINER_ID", 0)) == 0:
valid_dataloader = dali.val(config)
compiled_valid_prog = program.compile(config, valid_prog)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册