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

[Dy2stat]Fix error in tensor_shape_transformer. #37999

Merged
merged 3 commits into from
Dec 15, 2021

Conversation

0x45f
Copy link
Contributor

@0x45f 0x45f commented Dec 9, 2021

PR types

Others

PR changes

Others

Describe

修复tensor_shape_transformer中的错误。
之前在类似if len(paddle.shape(x)[0]) > 0中,paddle会被当做一个变量被传入convert_var_shape函数中。

…paddle.shape(x)[0]) > 0`, `paddle` will be used as a variable
@paddle-bot-old
Copy link

paddle-bot-old bot commented Dec 9, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM

@Aurelius84 Aurelius84 merged commit 5082249 into PaddlePaddle:develop Dec 15, 2021
0x45f added a commit to 0x45f/Paddle that referenced this pull request Dec 15, 2021
* fix error when tensor_shape_transformer. Before in stmt like `if len(paddle.shape(x)[0]) > 0`, `paddle` will be used as a variable

* handle other call like `fluid.layers.mean` and `fluid.layers.shape`

* add unit test
lanxianghit pushed a commit that referenced this pull request Dec 16, 2021
修复tensor_shape_transformer中的错误。
之前在类似if len(paddle.shape(x)[0]) > 0中,paddle会被当做一个变量被传入convert_var_shape函数中
@0x45f 0x45f deleted the dy2stat_paddle_shape branch December 24, 2021 04:50
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