Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
d0c7ece6
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看板
提交
d0c7ece6
编写于
7月 02, 2020
作者:
J
jiangjinsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix HistogramFixedWidth
上级
68731921
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
5 deletion
+7
-5
mindspore/ops/operations/array_ops.py
mindspore/ops/operations/array_ops.py
+1
-3
mindspore/ops/operations/math_ops.py
mindspore/ops/operations/math_ops.py
+2
-1
mindspore/ops/operations/nn_ops.py
mindspore/ops/operations/nn_ops.py
+4
-1
未找到文件。
mindspore/ops/operations/array_ops.py
浏览文件 @
d0c7ece6
...
@@ -1371,11 +1371,9 @@ class UnsortedSegmentMin(PrimitiveWithInfer):
...
@@ -1371,11 +1371,9 @@ class UnsortedSegmentMin(PrimitiveWithInfer):
"""
"""
Computes the minimum along segments of a tensor.
Computes the minimum along segments of a tensor.
If the given segment_ids is negative, the value will be ignored.
Inputs:
Inputs:
- **input_x** (Tensor) - The shape is :math:`(x_1, x_2, ..., x_R)`.
- **input_x** (Tensor) - The shape is :math:`(x_1, x_2, ..., x_R)`.
- **segment_ids** (Tensor) - A `1-D` tensor whose shape is :math:`(x_1)`.
- **segment_ids** (Tensor) - A `1-D` tensor whose shape is :math:`(x_1)`
, the value should be >= 0
.
- **num_segments** (int) - The value spcifies the number of distinct `segment_ids`.
- **num_segments** (int) - The value spcifies the number of distinct `segment_ids`.
Outputs:
Outputs:
...
...
mindspore/ops/operations/math_ops.py
浏览文件 @
d0c7ece6
...
@@ -1356,7 +1356,7 @@ class HistogramFixedWidth(PrimitiveWithInfer):
...
@@ -1356,7 +1356,7 @@ class HistogramFixedWidth(PrimitiveWithInfer):
Args:
Args:
dtype (string): An optional attribute. Must be one of the following types: "int32", "int64". Default: "int32".
dtype (string): An optional attribute. Must be one of the following types: "int32", "int64". Default: "int32".
nbins (
Tensor): Number of histogram bins, the type is int32
.
nbins (
int): Number of histogram bins, the type is positive integer
.
Inputs:
Inputs:
- **x** (Tensor) - Numeric Tensor. Must be one of the following types: int32, float32, float16.
- **x** (Tensor) - Numeric Tensor. Must be one of the following types: int32, float32, float16.
...
@@ -1377,6 +1377,7 @@ class HistogramFixedWidth(PrimitiveWithInfer):
...
@@ -1377,6 +1377,7 @@ class HistogramFixedWidth(PrimitiveWithInfer):
@
prim_attr_register
@
prim_attr_register
def
__init__
(
self
,
nbins
,
dtype
=
'int32'
):
def
__init__
(
self
,
nbins
,
dtype
=
'int32'
):
self
.
nbins
=
validator
.
check_value_type
(
"nbins"
,
nbins
,
[
int
],
self
.
name
)
self
.
nbins
=
validator
.
check_value_type
(
"nbins"
,
nbins
,
[
int
],
self
.
name
)
validator
.
check_integer
(
"nbins"
,
nbins
,
1
,
Rel
.
GE
,
self
.
name
)
valid_values
=
[
'int32'
,
'int64'
]
valid_values
=
[
'int32'
,
'int64'
]
self
.
dtype
=
validator
.
check_string
(
"dtype"
,
dtype
,
valid_values
,
self
.
name
)
self
.
dtype
=
validator
.
check_string
(
"dtype"
,
dtype
,
valid_values
,
self
.
name
)
self
.
init_prim_io_names
(
inputs
=
[
'x'
,
'range'
],
outputs
=
[
'y'
])
self
.
init_prim_io_names
(
inputs
=
[
'x'
,
'range'
],
outputs
=
[
'y'
])
...
...
mindspore/ops/operations/nn_ops.py
浏览文件 @
d0c7ece6
...
@@ -1738,6 +1738,8 @@ class SGD(PrimitiveWithInfer):
...
@@ -1738,6 +1738,8 @@ class SGD(PrimitiveWithInfer):
@
prim_attr_register
@
prim_attr_register
def
__init__
(
self
,
dampening
=
0.0
,
weight_decay
=
0.0
,
nesterov
=
False
):
def
__init__
(
self
,
dampening
=
0.0
,
weight_decay
=
0.0
,
nesterov
=
False
):
validator
.
check_value_type
(
"nesterov"
,
nesterov
,
[
bool
],
self
.
name
)
validator
.
check_value_type
(
"nesterov"
,
nesterov
,
[
bool
],
self
.
name
)
if
nesterov
and
dampening
!=
0
:
raise
ValueError
(
f
"Nesterov need zero dampening!"
)
self
.
init_prim_io_names
(
inputs
=
[
'parameters'
,
'gradient'
,
'learning_rate'
,
'accum'
,
'momentum'
,
'stat'
],
self
.
init_prim_io_names
(
inputs
=
[
'parameters'
,
'gradient'
,
'learning_rate'
,
'accum'
,
'momentum'
,
'stat'
],
outputs
=
[
'output'
])
outputs
=
[
'output'
])
...
@@ -2151,7 +2153,8 @@ class ResizeBilinear(PrimitiveWithInfer):
...
@@ -2151,7 +2153,8 @@ class ResizeBilinear(PrimitiveWithInfer):
rescale by `new_height / height`. Default: False.
rescale by `new_height / height`. Default: False.
Inputs:
Inputs:
- **input** (Tensor) - Image to be resized. Tensor of shape `(N_i, ..., N_n, height, width)`.
- **input** (Tensor) - Image to be resized. Tensor of shape `(N_i, ..., N_n, height, width)`,
with data type of float32 or float16.
Outputs:
Outputs:
Tensor, resized image. Tensor of shape `(N_i, ..., N_n, new_height, new_width)` in `float32`.
Tensor, resized image. Tensor of shape `(N_i, ..., N_n, new_height, new_width)` in `float32`.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录