Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failure to trace densenet #23

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

SigureMo
Copy link
Collaborator

@SigureMo SigureMo commented Mar 8, 2023

修复 #22 提及的:

failed on DenseNet, since it calls into _C_ops.

这里是因为 BatchNorm 在 PaddlePaddle 2.4 还在 paddle.fluid.dygraph.nn,因此之前(#15)根据判断模块是否在 paddle.nn 下来判断是否是一个 paddle API 在 2.4 下是不完善的(但在 develop 是没问题的,因为已经全部移出 fluid 了),所以原来这里直接 trace 了这个 API,而不是直接跳过,导致调用内部的 _C_ops

另外在 codegen 时期 target 和 name 不一致的时候加了一个赋值语句,以确保参数存在

@SigureMo SigureMo requested a review from jzhang533 March 8, 2023 12:22
Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@jzhang533 jzhang533 merged commit 67c1cee into PFCCLab:main Mar 8, 2023
@SigureMo SigureMo deleted the fix-is-leaf-module-judge branch March 8, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants