Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

paddle模型正向和反向的op list

Open duwenzhao opened this issue 4 years ago • 5 comments

请提出你的问题 Please ask your question

对于paddle模型,有什么方法可以获得模型正向和反向的op list 吗?

duwenzhao avatar Sep 29 '22 03:09 duwenzhao

静态图方式:print(your_program.ops)

Caozhou1995 avatar Sep 29 '22 05:09 Caozhou1995

动态图下:export GLOG_vmodule=dygraph_functions=3,nodes=3,tracer=1,跑模型时会打印运行OP的日志。

Caozhou1995 avatar Sep 29 '22 05:09 Caozhou1995

使用paddle.enable_static() 动态图转静态图,静态图方式:print(your_program.ops)中的your_program 是什么?

duwenzhao avatar Sep 30 '22 15:09 duwenzhao

是你转换后的program,可以参考这个链接:https://www.paddlepaddle.org.cn/documentation/docs/zh/2.4rc/api/paddle/static/Program_cn.html#program

Caozhou1995 avatar Oct 09 '22 09:10 Caozhou1995

Since you haven't replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

paddle-bot avatar Oct 10 '23 06:10 paddle-bot