提交 04df8a89 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!535 change hswish and hsigmoid accroding to primitive

Merge pull request !535 from SanjayChan/hswish
......@@ -26,7 +26,7 @@ from .squeeze_grad import SqueezeGrad, gpu_schedule_SqueezeGrad
from .mean import SimpleMean, gpu_schedule_SimpleMean
from .mean_grad import SimpleMeanGrad, gpu_schedule_SimpleMeanGrad
from .mul import Mul, gpu_schedule_Mul
from .hsigmoid import Hsigmoid, gpu_schedule_Hsigmoid
from .hsigmoid_grad import HsigmoidGrad, gpu_schedule_HsigmoidGrad
from .hswish import Hswish, gpu_schedule_Hswish
from .hswish_grad import HswishGrad, gpu_schedule_HswishGrad
from .hsigmoid import HSigmoid, gpu_schedule_HSigmoid
from .hsigmoid_grad import HSigmoidGrad, gpu_schedule_HSigmoidGrad
from .hswish import HSwish, gpu_schedule_HSwish
from .hswish_grad import HSwishGrad, gpu_schedule_HSwishGrad
......@@ -33,9 +33,9 @@ def topi_nn_hsigmoid(x):
(x(*i) + 3) / 6)))
def Hsigmoid(x):
def HSigmoid(x):
"""
Hsigmoid
HSigmoid
Args:
x:
......@@ -45,9 +45,9 @@ def Hsigmoid(x):
return topi_nn_hsigmoid(x)
def gpu_schedule_Hsigmoid(outs):
def gpu_schedule_HSigmoid(outs):
"""
gpu schedule Hsigmoid
gpu schedule HSigmoid
Args:
outs:
......
......@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Hsigmoid grad"""
"""HSigmoid grad"""
import _akg.topi as topi
import _akg.tvm as tvm
def HsigmoidGrad(y_grad, x):
def HSigmoidGrad(y_grad, x):
"""
HsigmoidGrad
HSigmoidGrad
Args:
y_grad:
x:
......@@ -32,7 +32,7 @@ def HsigmoidGrad(y_grad, x):
y_grad(*i) / 6)))
def gpu_schedule_HsigmoidGrad(outs):
def gpu_schedule_HSigmoidGrad(outs):
"""
gpu schedule ReLU6Grad
Args:
......
......@@ -33,9 +33,9 @@ def topi_nn_hswish(x):
x(*i) * (x(*i) + 3) / 6)))
def Hswish(x):
def HSwish(x):
"""
Hswish
HSwish
Args:
x:
......@@ -45,9 +45,9 @@ def Hswish(x):
return topi_nn_hswish(x)
def gpu_schedule_Hswish(outs):
def gpu_schedule_HSwish(outs):
"""
gpu schedule Hswish
gpu schedule HSwish
Args:
outs:
......
......@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""HswishGrad"""
"""HSwishGrad"""
import _akg.topi as topi
import _akg.tvm as tvm
def HswishGrad(y_grad, x):
def HSwishGrad(y_grad, x):
"""
HswishGrad
HSwishGrad
Args:
y_grad:
x:
......@@ -34,9 +34,9 @@ def HswishGrad(y_grad, x):
return res6
def gpu_schedule_HswishGrad(outs):
def gpu_schedule_HSwishGrad(outs):
"""
gpu schedule HswishGrad
gpu schedule HSwishGrad
Args:
outs:
......
......@@ -48,8 +48,8 @@ OpAttrFactory::OpAttrFactory() {
{"Softsign", ActivationPacker},
{"Softplus", ActivationPacker},
{"Tanh", ActivationPacker},
{"Hswish", ActivationPacker},
{"Hsigmoid", ActivationPacker},
{"HSwish", ActivationPacker},
{"HSigmoid", ActivationPacker},
{"MaxPool", PoolingPacker},
{"MaxPool2D", PoolingPacker},
{"MeanPool", PoolingPacker},
......
......@@ -346,7 +346,7 @@ class HSwish(Cell):
where :math:`x_{i}` is the :math:`i`-th slice along the given dim of the input Tensor.
Inputs:
- **input_data** (Tensor) - The input of Hswish.
- **input_data** (Tensor) - The input of HSwish.
Outputs:
Tensor, with the same type and shape as the `input_data`.
......
......@@ -23,3 +23,7 @@ from .relu6_grad import _relu6_grad_akg
from .squeeze import _squeeze_akg
from .squeeze_grad import _squeeze_grad_akg
from .tile import _tile_akg
from .hsigmoid import _hsigmoid_akg
from .hsigmoid_grad import _hsigmoid_grad_akg
from .hswish import _hswish_akg
from .hswish_grad import _hswish_grad_akg
......@@ -258,7 +258,7 @@ class HSwish(PrimitiveWithInfer):
where :math:`x_{i}` is the :math:`i`-th slice along the given dim of the input Tensor.
Inputs:
- **input_data** (Tensor) - The input of Hswish.
- **input_data** (Tensor) - The input of HSwish.
Outputs:
Tensor, with the same type and shape as the `input_data`.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册