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

[Cherry-Pick][Dy2stat]Fix error in tensor_shape_transformer. (#37999) #38168

Merged

Conversation

0x45f
Copy link
Contributor

@0x45f 0x45f commented Dec 15, 2021

PR types

Others

PR changes

Others

Describe

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

* 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
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

@lanxianghit lanxianghit merged commit 19eb510 into PaddlePaddle:release/2.2 Dec 16, 2021
@0x45f 0x45f deleted the pick_dy2stat_paddle_shape branch December 24, 2021 04:49
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.

3 participants