提交 f34830e2 编写于 作者: K Krzysztof Binias 提交者: Tao Luo

Enable SQRT operator for the nGraph Bridge (#17549)

* Enable sqrt operator for the nGraph Bridge.

test=develop

* Update activation_op.h
上级 96845d21
...@@ -113,5 +113,6 @@ void BuildTanhGradNode( ...@@ -113,5 +113,6 @@ void BuildTanhGradNode(
REGISTER_NG_OP(gelu, BuildGeluNode); REGISTER_NG_OP(gelu, BuildGeluNode);
REGISTER_NG_OP(gelu_grad, BuildGeluGradNode); REGISTER_NG_OP(gelu_grad, BuildGeluGradNode);
REGISTER_NG_OP(relu_grad, BuildReluGradNode); REGISTER_NG_OP(relu_grad, BuildReluGradNode);
REGISTER_NG_OP(sqrt, BuildUnaryNode<ngraph::op::Sqrt>);
REGISTER_NG_OP(square, BuildSquareNode); REGISTER_NG_OP(square, BuildSquareNode);
REGISTER_NG_OP(tanh_grad, BuildTanhGradNode); REGISTER_NG_OP(tanh_grad, BuildTanhGradNode);
...@@ -18,7 +18,7 @@ import unittest ...@@ -18,7 +18,7 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.tests.unittests.op_test import OpTest from paddle.fluid.tests.unittests.op_test import OpTest
from paddle.fluid.tests.unittests.test_activation_op import TestAbs, TestGelu, TestSigmoid, TestSquare, TestRelu, TestTanh from paddle.fluid.tests.unittests.test_activation_op import TestAbs, TestGelu, TestSigmoid, TestSqrt, TestSquare, TestRelu, TestTanh
class TestNGRAPHReluDim4(TestRelu): class TestNGRAPHReluDim4(TestRelu):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册