Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
04df8a89
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
04df8a89
编写于
4月 21, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
!535 change hswish and hsigmoid accroding to primitive
Merge pull request !535 from SanjayChan/hswish
上级
7355113b
c0229fa9
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
29 addition
and
25 deletion
+29
-25
mindspore/_akg/gpu/__init__.py
mindspore/_akg/gpu/__init__.py
+4
-4
mindspore/_akg/gpu/hsigmoid.py
mindspore/_akg/gpu/hsigmoid.py
+4
-4
mindspore/_akg/gpu/hsigmoid_grad.py
mindspore/_akg/gpu/hsigmoid_grad.py
+4
-4
mindspore/_akg/gpu/hswish.py
mindspore/_akg/gpu/hswish.py
+4
-4
mindspore/_akg/gpu/hswish_grad.py
mindspore/_akg/gpu/hswish_grad.py
+5
-5
mindspore/ccsrc/predict/converter/lite_model/op_attr_packer.cc
...pore/ccsrc/predict/converter/lite_model/op_attr_packer.cc
+2
-2
mindspore/nn/layer/activation.py
mindspore/nn/layer/activation.py
+1
-1
mindspore/ops/_op_impl/akg/gpu/__init__.py
mindspore/ops/_op_impl/akg/gpu/__init__.py
+4
-0
mindspore/ops/operations/nn_ops.py
mindspore/ops/operations/nn_ops.py
+1
-1
未找到文件。
mindspore/_akg/gpu/__init__.py
浏览文件 @
04df8a89
...
...
@@ -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
H
sigmoid
,
gpu_schedule_Hs
igmoid
from
.hsigmoid_grad
import
H
sigmoidGrad
,
gpu_schedule_Hs
igmoidGrad
from
.hswish
import
H
swish
,
gpu_schedule_Hs
wish
from
.hswish_grad
import
H
swishGrad
,
gpu_schedule_Hs
wishGrad
from
.hsigmoid
import
H
Sigmoid
,
gpu_schedule_HS
igmoid
from
.hsigmoid_grad
import
H
SigmoidGrad
,
gpu_schedule_HS
igmoidGrad
from
.hswish
import
H
Swish
,
gpu_schedule_HS
wish
from
.hswish_grad
import
H
SwishGrad
,
gpu_schedule_HS
wishGrad
mindspore/_akg/gpu/hsigmoid.py
浏览文件 @
04df8a89
...
...
@@ -33,9 +33,9 @@ def topi_nn_hsigmoid(x):
(
x
(
*
i
)
+
3
)
/
6
)))
def
H
s
igmoid
(
x
):
def
H
S
igmoid
(
x
):
"""
H
s
igmoid
H
S
igmoid
Args:
x:
...
...
@@ -45,9 +45,9 @@ def Hsigmoid(x):
return
topi_nn_hsigmoid
(
x
)
def
gpu_schedule_H
s
igmoid
(
outs
):
def
gpu_schedule_H
S
igmoid
(
outs
):
"""
gpu schedule H
s
igmoid
gpu schedule H
S
igmoid
Args:
outs:
...
...
mindspore/_akg/gpu/hsigmoid_grad.py
浏览文件 @
04df8a89
...
...
@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""H
s
igmoid grad"""
"""H
S
igmoid grad"""
import
_akg.topi
as
topi
import
_akg.tvm
as
tvm
def
H
s
igmoidGrad
(
y_grad
,
x
):
def
H
S
igmoidGrad
(
y_grad
,
x
):
"""
H
s
igmoidGrad
H
S
igmoidGrad
Args:
y_grad:
x:
...
...
@@ -32,7 +32,7 @@ def HsigmoidGrad(y_grad, x):
y_grad
(
*
i
)
/
6
)))
def
gpu_schedule_H
s
igmoidGrad
(
outs
):
def
gpu_schedule_H
S
igmoidGrad
(
outs
):
"""
gpu schedule ReLU6Grad
Args:
...
...
mindspore/_akg/gpu/hswish.py
浏览文件 @
04df8a89
...
...
@@ -33,9 +33,9 @@ def topi_nn_hswish(x):
x
(
*
i
)
*
(
x
(
*
i
)
+
3
)
/
6
)))
def
H
s
wish
(
x
):
def
H
S
wish
(
x
):
"""
H
s
wish
H
S
wish
Args:
x:
...
...
@@ -45,9 +45,9 @@ def Hswish(x):
return
topi_nn_hswish
(
x
)
def
gpu_schedule_H
s
wish
(
outs
):
def
gpu_schedule_H
S
wish
(
outs
):
"""
gpu schedule H
s
wish
gpu schedule H
S
wish
Args:
outs:
...
...
mindspore/_akg/gpu/hswish_grad.py
浏览文件 @
04df8a89
...
...
@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""H
s
wishGrad"""
"""H
S
wishGrad"""
import
_akg.topi
as
topi
import
_akg.tvm
as
tvm
def
H
s
wishGrad
(
y_grad
,
x
):
def
H
S
wishGrad
(
y_grad
,
x
):
"""
H
s
wishGrad
H
S
wishGrad
Args:
y_grad:
x:
...
...
@@ -34,9 +34,9 @@ def HswishGrad(y_grad, x):
return
res6
def
gpu_schedule_H
s
wishGrad
(
outs
):
def
gpu_schedule_H
S
wishGrad
(
outs
):
"""
gpu schedule H
s
wishGrad
gpu schedule H
S
wishGrad
Args:
outs:
...
...
mindspore/ccsrc/predict/converter/lite_model/op_attr_packer.cc
浏览文件 @
04df8a89
...
...
@@ -48,8 +48,8 @@ OpAttrFactory::OpAttrFactory() {
{
"Softsign"
,
ActivationPacker
},
{
"Softplus"
,
ActivationPacker
},
{
"Tanh"
,
ActivationPacker
},
{
"H
s
wish"
,
ActivationPacker
},
{
"H
s
igmoid"
,
ActivationPacker
},
{
"H
S
wish"
,
ActivationPacker
},
{
"H
S
igmoid"
,
ActivationPacker
},
{
"MaxPool"
,
PoolingPacker
},
{
"MaxPool2D"
,
PoolingPacker
},
{
"MeanPool"
,
PoolingPacker
},
...
...
mindspore/nn/layer/activation.py
浏览文件 @
04df8a89
...
...
@@ -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 H
s
wish.
- **input_data** (Tensor) - The input of H
S
wish.
Outputs:
Tensor, with the same type and shape as the `input_data`.
...
...
mindspore/ops/_op_impl/akg/gpu/__init__.py
浏览文件 @
04df8a89
...
...
@@ -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
mindspore/ops/operations/nn_ops.py
浏览文件 @
04df8a89
...
...
@@ -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 H
s
wish.
- **input_data** (Tensor) - The input of H
S
wish.
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录