Skip to content

Conversation

@pangyoki
Copy link
Contributor

@pangyoki pangyoki commented Jan 20, 2021

PR types

New features

PR changes

APIs

Describe

Inplace Strategy has been implemented in PR #30103 .
Add 9 Inplace APIs in this PR.

Inplace OP fluid下API paddle下API 新增Inplace API
relu6 paddle.fluid.layers.nn.relu6 paddle.nn.functional.activation.relu6 paddle.nn.functional.activation.relu6_
hard_sigmoid paddle.fluid.layers.nn.hardsigmoid paddle.nn.functional.activation.hardsigmoid paddle.nn.functional.activation.hardsigmoid_
leaky_relu paddle.fluid.layers.nn.leaky_relu paddle.nn.functional.activation.leaky_relu paddle.nn.functional.activation.leaky_relu_
softmax_with_cross_entropy paddle.fluid.layers.loss.softmax_with_cross_entropy paddle.nn.functional.loss.softmax_with_cross_entropy paddle.nn.functional.loss.softmax_with_cross_entropy_
sum paddle.fluid.layers.nn.sum paddle.tensor.math.add_n paddle.tensor.math.add_n_
clip paddle.fluid.layers.nn.clip paddle.tensor.math.clip paddle.tensor.math.clip_
scale paddle.fluid.layers.nn.scale paddle.tensor.math.scale paddle.tensor.math.scale_
elementwise_sub paddle.fluid.layers.nn.elementwise_sub paddle.tensor.math.subtract paddle.tensor.math.subtract_
elementwise_add paddle.fluid.layers.nn.elementwise_add paddle.tensor.math.add paddle.tensor.math.add_

@paddle-bot-old
Copy link

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

@pangyoki pangyoki changed the title add relu6_ hardsigmoid_ leaky_relu_ Inplace APIs add Inplace APIs Jan 20, 2021
@pangyoki pangyoki changed the title add Inplace APIs add 9 Inplace APIs that have core.ops implementation in its original APIs Jan 21, 2021
def test_broadcast_errors(self):
paddle.disable_static()
x = paddle.rand([3, 4])
y = paddle.rand([2, 3, 4])
Copy link
Contributor

Choose a reason for hiding this comment

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

add more comlecated broadcast testcases, e.g., [1,2,1,3] and [4,2,5,1]

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

inplace_shape = x.shape
out = _elementwise_op_in_dygraph(
x, y, axis=axis, op_name=op_type)
if inplace_shape != out.shape:
Copy link
Contributor

Choose a reason for hiding this comment

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

The check should be down before the execution of the op.

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

@paddle-bot-old
Copy link

paddle-bot-old bot commented Feb 4, 2021

Sorry to inform you that a2cec25's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@paddle-bot-old paddle-bot-old bot closed this Feb 15, 2022
@paddle-bot-old
Copy link

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

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