Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
c6ba87d9
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看板
提交
c6ba87d9
编写于
9月 05, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
9月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
!5804 fix bugs of op Fill, Equal, Eye, Conv2dTranspose and ExpandDims
Merge pull request !5804 from lihongkang/lhk_master
上级
5c7fa524
0f76c362
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
6 deletion
+13
-6
mindspore/_checkparam.py
mindspore/_checkparam.py
+1
-1
mindspore/nn/layer/conv.py
mindspore/nn/layer/conv.py
+2
-1
mindspore/ops/operations/array_ops.py
mindspore/ops/operations/array_ops.py
+6
-0
mindspore/ops/operations/math_ops.py
mindspore/ops/operations/math_ops.py
+4
-4
未找到文件。
mindspore/_checkparam.py
浏览文件 @
c6ba87d9
...
@@ -139,7 +139,7 @@ class Validator:
...
@@ -139,7 +139,7 @@ class Validator:
def
check_int_range
(
arg_name
,
arg_value
,
lower_limit
,
upper_limit
,
rel
,
prim_name
):
def
check_int_range
(
arg_name
,
arg_value
,
lower_limit
,
upper_limit
,
rel
,
prim_name
):
"""Method for checking whether an int value is in some range."""
"""Method for checking whether an int value is in some range."""
rel_fn
=
Rel
.
get_fns
(
rel
)
rel_fn
=
Rel
.
get_fns
(
rel
)
type_mismatch
=
not
isinstance
(
arg_value
,
int
)
type_mismatch
=
not
isinstance
(
arg_value
,
int
)
or
isinstance
(
arg_value
,
bool
)
excp_cls
=
TypeError
if
type_mismatch
else
ValueError
excp_cls
=
TypeError
if
type_mismatch
else
ValueError
if
type_mismatch
or
not
rel_fn
(
arg_value
,
lower_limit
,
upper_limit
):
if
type_mismatch
or
not
rel_fn
(
arg_value
,
lower_limit
,
upper_limit
):
rel_str
=
Rel
.
get_strs
(
rel
).
format
(
lower_limit
,
upper_limit
)
rel_str
=
Rel
.
get_strs
(
rel
).
format
(
lower_limit
,
upper_limit
)
...
...
mindspore/nn/layer/conv.py
浏览文件 @
c6ba87d9
...
@@ -461,7 +461,8 @@ class Conv2dTranspose(_Conv):
...
@@ -461,7 +461,8 @@ class Conv2dTranspose(_Conv):
width of the kernel.
width of the kernel.
stride (Union[int, tuple[int]]): The distance of kernel moving, an int number that represents
stride (Union[int, tuple[int]]): The distance of kernel moving, an int number that represents
the height and width of movement are both strides, or a tuple of two int numbers that
the height and width of movement are both strides, or a tuple of two int numbers that
represent height and width of movement respectively. Default: 1.
represent height and width of movement respectively. Its value should be equal to or greater than 1.
Default: 1.
pad_mode (str): Select the mode of the pad. The optional values are
pad_mode (str): Select the mode of the pad. The optional values are
"pad", "same", "valid". Default: "same".
"pad", "same", "valid". Default: "same".
...
...
mindspore/ops/operations/array_ops.py
浏览文件 @
c6ba87d9
...
@@ -115,6 +115,8 @@ class ExpandDims(PrimitiveWithInfer):
...
@@ -115,6 +115,8 @@ class ExpandDims(PrimitiveWithInfer):
>>> input_tensor = Tensor(np.array([[2, 2], [2, 2]]), mindspore.float32)
>>> input_tensor = Tensor(np.array([[2, 2], [2, 2]]), mindspore.float32)
>>> expand_dims = P.ExpandDims()
>>> expand_dims = P.ExpandDims()
>>> output = expand_dims(input_tensor, 0)
>>> output = expand_dims(input_tensor, 0)
[[[2.0, 2.0],
[2.0, 2.0]]]
"""
"""
@
prim_attr_register
@
prim_attr_register
...
@@ -887,6 +889,8 @@ class Fill(PrimitiveWithInfer):
...
@@ -887,6 +889,8 @@ class Fill(PrimitiveWithInfer):
Examples:
Examples:
>>> fill = P.Fill()
>>> fill = P.Fill()
>>> fill(mindspore.float32, (2, 2), 1)
>>> fill(mindspore.float32, (2, 2), 1)
[[1.0, 1.0],
[1.0, 1.0]]
"""
"""
@
prim_attr_register
@
prim_attr_register
...
@@ -2364,6 +2368,8 @@ class Eye(PrimitiveWithInfer):
...
@@ -2364,6 +2368,8 @@ class Eye(PrimitiveWithInfer):
Examples:
Examples:
>>> eye = P.Eye()
>>> eye = P.Eye()
>>> out_tensor = eye(2, 2, mindspore.int32)
>>> out_tensor = eye(2, 2, mindspore.int32)
[[1, 0],
[0, 1]]
"""
"""
@
prim_attr_register
@
prim_attr_register
...
...
mindspore/ops/operations/math_ops.py
浏览文件 @
c6ba87d9
...
@@ -2244,10 +2244,10 @@ class Equal(_LogicBinaryOp):
...
@@ -2244,10 +2244,10 @@ class Equal(_LogicBinaryOp):
When the inputs are one tensor and one scalar, the scalar only could be a constant.
When the inputs are one tensor and one scalar, the scalar only could be a constant.
Inputs:
Inputs:
- **input_x** (Union[Tensor, Number
, bool
]) - The first input is a number or
- **input_x** (Union[Tensor, Number]) - The first input is a number or
a
bool or a tensor whose data type is number or bool
.
a
tensor whose data type is number
.
- **input_y** (Union[Tensor, Number
, bool]) - The second input is a number o
r
- **input_y** (Union[Tensor, Number
]) - The second input is a numbe
r
a bool when the first input is a tensor or a tensor whose data type is number or bool
.
when the first input is a tensor or a tensor whose data type is number
.
Outputs:
Outputs:
Tensor, the shape is the same as the one after broadcasting,and the data type is bool.
Tensor, the shape is the same as the one after broadcasting,and the data type is bool.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录