Skip to content

Conversation

@JiabinYang
Copy link
Contributor

PR types

Function optimization

PR changes

APIs

Describe

This PR try to add a shape related constructor for paddle::Tensor, and give user more instruction about using of paddle::Tensor::reshape

@paddle-bot-old
Copy link

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

@JiabinYang JiabinYang changed the title Refine custom op [CustomOP] Add shape related constructor for Tensor Mar 17, 2021
: tensor_(std::make_shared<framework::LoDTensor>()),
place_(place),
stream_(StreamWrapper()) {
reshape(shape);
Copy link
Contributor

Choose a reason for hiding this comment

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

这里直接调用Resize吧,构造函数是我们提供的接口,这里不需要警告用户

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql merged commit 51eb29d into PaddlePaddle:develop Mar 29, 2021
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