[Dy2Stat]Support convert sublayers in Sequential Container #32978
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.
PR types
New features
PR changes
Others
Describe
1. PR功能
支持
Paddle.nn.Sequential
中的sublayer的代码转换。之前对于
paddle.nn.Sequential
容器内的layers,由于在convert_call_func
时,识别为Paddle内部API,因此会跳过转换。此Layer为一个容器,内部常包含很多用户定义的Layer,因此需要进行转换。当
Sequential
包含了Paddle自身的Layer,由于convert_call_func
会递归判断,因此不会对Paddle内部的Layer误处理。2. 代码样例