Skip to content

Users Questions from Wechat #9058

Answered by strint
silviahsia1201 asked this question in Q&A
Discussion options

You must be logged in to vote

静态图的采用了全图的 trace 机制,trace 就是根据代码的执行算子的路径去构图。

因为训练和验证的执行逻辑不同,所以就需要 trace 成两个不同的图。

这两个图也适合做不同的配置。比如训练图可以配置 optimizer、grad scale,而预测图则不需要。

两个图会通过共同的nn.Module来共享参数。

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by strint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants