【论文复现】模型保存与加载
Created by: agrichron
Thank you for contributing to PaddlePaddle. Submitting an issue is a great help for us. Both Chinese and English issues are welcome.
It's hard to solve a problem when important details are missing. Before submitting the issue, look over the following criteria before handing your request in.
环境
- Python版本:python3.7
- 框架版本:PaddlePaddle 1.8.0
模型保存
if writer:
writer.add_scalar(tag='val/loss', step=(epoch+1), value = val_avg_loss )
writer.add_scalar(tag='val/acc', step=(epoch+1), value = val_avg_acc )
print(f'epoch:{epoch+1} val avg_loss:{val_avg_loss} eval acc:{val_avg_acc}')
fluid.io.save(program, 'models/eco_full')
模型加载:
fluid.io.load(main_program, 'models/eco_full', train_exe)
- Was there a similar issue submitted or resolved before ? You could search issue in the github.
- Did you retrieve your issue from widespread search engines ?
-
Is my description of the issue clear enough to reproduce this problem?
- If some errors occurred, we need details about
how do you run your code?
,what system do you use?
,Are you using GPU or not?
, etc. - If you use an recording asciinema to show what you are doing to make it happen, that's awesome! We could help you solve the problem more quickly.
- If some errors occurred, we need details about
-
Is my description of the issue use the github markdown correctly?
- Please use the proper markdown syntaxes for styling all forms of writing, e.g, source code, error information, etc.
- Check out this page to find out much more about markdown.