【Zero-Dim】Support Zero dim for embedding and one-hot by seemingwang · Pull Request #49562 · PaddlePaddle/Paddle

@seemingwang

PR types

Others

PR changes

Others

Describe

support zero-dimension input for embedding and one-hot api-

@zhwesky2010 zhwesky2010 changed the title Zero d 【Zero-Dim】Support Zero dim for embedding and one-hot

Jan 5, 2023

zhwesky2010

Choose a reason for hiding this comment

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

customdevice 与主repo case一致

x_dims.size(),
1,
phi::errors::InvalidArgument("Rank of Input(X) should be at least 1."));
// PADDLE_ENFORCE_GE(

Choose a reason for hiding this comment

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

这个改成>=0吧

x_dims.size(),
1,
phi::errors::InvalidArgument("Rank of Input(X) should be at least 1."));
// PADDLE_ENFORCE_GE(

Choose a reason for hiding this comment

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

这个改成>=0吧

@seemingwang

zhwesky2010

Choose a reason for hiding this comment

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

LGTM

@seemingwang

zhwesky2010