demo1.py 404 字节
Newer Older
X
xixiaoyao 已提交
1 2 3
import paddlepalm as palm

if __name__ == '__main__':
X
xixiaoyao 已提交
4
    controller = palm.Controller('demo1_config.yaml', task_dir='demo1_tasks')
X
xixiaoyao 已提交
5 6 7
    controller.load_pretrain('pretrain_model/ernie/params')
    controller.train()

X
xixiaoyao 已提交
8
    controller = palm.Controller(config='demo1_config.yaml', task_dir='demo1_tasks', for_train=False)
X
xixiaoyao 已提交
9 10
    controller.pred('mrqa', inference_model_dir='output_model/firstrun/infer_model')