Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复 #22 提及的:
这里是因为 BatchNorm 在 PaddlePaddle 2.4 还在
paddle.fluid.dygraph.nn
,因此之前(#15)根据判断模块是否在paddle.nn
下来判断是否是一个 paddle API 在 2.4 下是不完善的(但在 develop 是没问题的,因为已经全部移出 fluid 了),所以原来这里直接 trace 了这个 API,而不是直接跳过,导致调用内部的_C_ops
另外在 codegen 时期 target 和 name 不一致的时候加了一个赋值语句,以确保参数存在