Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
0f399f0a
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看板
提交
0f399f0a
编写于
7月 03, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
7月 03, 2020
浏览文件
操作
浏览文件
下载
差异文件
!2814 fix HistogramFixedWidth
Merge pull request !2814 from jiangjinsheng/issue_fix4
上级
2cd9649b
d0c7ece6
变更
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
浏览文件 @
0f399f0a
...
...
@@ -1371,11 +1371,9 @@ class UnsortedSegmentMin(PrimitiveWithInfer):
"""
Computes the minimum along segments of a tensor.
If the given segment_ids is negative, the value will be ignored.
Inputs:
- **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`.
Outputs:
...
...
mindspore/ops/operations/math_ops.py
浏览文件 @
0f399f0a
...
...
@@ -1356,7 +1356,7 @@ class HistogramFixedWidth(PrimitiveWithInfer):
Args:
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:
- **x** (Tensor) - Numeric Tensor. Must be one of the following types: int32, float32, float16.
...
...
@@ -1377,6 +1377,7 @@ class HistogramFixedWidth(PrimitiveWithInfer):
@
prim_attr_register
def
__init__
(
self
,
nbins
,
dtype
=
'int32'
):
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'
]
self
.
dtype
=
validator
.
check_string
(
"dtype"
,
dtype
,
valid_values
,
self
.
name
)
self
.
init_prim_io_names
(
inputs
=
[
'x'
,
'range'
],
outputs
=
[
'y'
])
...
...
mindspore/ops/operations/nn_ops.py
浏览文件 @
0f399f0a
...
...
@@ -1773,6 +1773,8 @@ class SGD(PrimitiveWithInfer):
@
prim_attr_register
def
__init__
(
self
,
dampening
=
0.0
,
weight_decay
=
0.0
,
nesterov
=
False
):
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'
],
outputs
=
[
'output'
])
...
...
@@ -2186,7 +2188,8 @@ class ResizeBilinear(PrimitiveWithInfer):
rescale by `new_height / height`. Default: False.
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:
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录