提交 c02e1fb1 编写于 作者: W WuHaobo

use compiled program

上级 9acc8a75
......@@ -71,9 +71,8 @@ def main(args):
valid_reader = Reader(config, 'valid')()
valid_dataloader.set_sample_list_generator(valid_reader, place)
#compiled_valid_prog = program.compile(config, valid_prog)
compiled_valid_prog = valid_prog
compiled_valid_prog = program.compile(config, valid_prog)
program.run(valid_dataloader, exe, compiled_valid_prog, valid_fetchs, 0,
'valid')
......
......@@ -24,7 +24,6 @@ from paddle.fluid.incubate.fleet.base import role_maker
from paddle.fluid.incubate.fleet.collective import fleet
from ppcls.data import Reader
from ppcls.utils import logger
from ppcls.utils.config import get_config
from ppcls.utils.save_load import init_model, save_model
import program
......@@ -86,8 +85,8 @@ def main(args):
if config.validate:
valid_reader = Reader(config, 'valid')()
valid_dataloader.set_sample_list_generator(valid_reader, place)
#compiled_valid_prog = program.compile(config, valid_prog)
compiled_valid_prog = valid_prog
compiled_valid_prog = program.compile(config, valid_prog)
compiled_train_prog = fleet.main_program
for epoch_id in range(config.epochs):
# 1. train with train dataset
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册