Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
aefca7b7
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看板
提交
aefca7b7
编写于
8月 22, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4968 Fix some errors in API about ops and validator of input.
Merge pull request !4968 from liuxiao93/fix-some-bug
上级
15564504
cfe88594
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
4 deletion
+5
-4
mindspore/nn/layer/conv.py
mindspore/nn/layer/conv.py
+2
-1
mindspore/ops/operations/math_ops.py
mindspore/ops/operations/math_ops.py
+3
-3
未找到文件。
mindspore/nn/layer/conv.py
浏览文件 @
aefca7b7
...
@@ -70,7 +70,8 @@ class _Conv(Cell):
...
@@ -70,7 +70,8 @@ class _Conv(Cell):
kernel_size
[
0
]
<
1
or
kernel_size
[
1
]
<
1
:
kernel_size
[
0
]
<
1
or
kernel_size
[
1
]
<
1
:
raise
ValueError
(
"Attr 'kernel_size' of 'Conv2D' Op passed "
raise
ValueError
(
"Attr 'kernel_size' of 'Conv2D' Op passed "
+
str
(
self
.
kernel_size
)
+
", should be a int or tuple and equal to or greater than 1."
)
+
str
(
self
.
kernel_size
)
+
", should be a int or tuple and equal to or greater than 1."
)
if
(
not
isinstance
(
stride
[
0
],
int
))
or
(
not
isinstance
(
stride
[
1
],
int
))
or
stride
[
0
]
<
1
or
stride
[
1
]
<
1
:
if
(
not
isinstance
(
stride
[
0
],
int
))
or
(
not
isinstance
(
stride
[
1
],
int
))
or
\
isinstance
(
stride
[
0
],
bool
)
or
isinstance
(
stride
[
1
],
bool
)
or
stride
[
0
]
<
1
or
stride
[
1
]
<
1
:
raise
ValueError
(
"Attr 'stride' of 'Conv2D' Op passed "
raise
ValueError
(
"Attr 'stride' of 'Conv2D' Op passed "
+
str
(
self
.
stride
)
+
", should be a int or tuple and equal to or greater than 1."
)
+
str
(
self
.
stride
)
+
", should be a int or tuple and equal to or greater than 1."
)
if
(
not
isinstance
(
dilation
[
0
],
int
))
or
(
not
isinstance
(
dilation
[
1
],
int
))
or
\
if
(
not
isinstance
(
dilation
[
0
],
int
))
or
(
not
isinstance
(
dilation
[
1
],
int
))
or
\
...
...
mindspore/ops/operations/math_ops.py
浏览文件 @
aefca7b7
...
@@ -786,7 +786,7 @@ class AddN(PrimitiveWithInfer):
...
@@ -786,7 +786,7 @@ class AddN(PrimitiveWithInfer):
>>> input_x = Tensor(np.array([1, 2, 3]), mindspore.float32)
>>> input_x = Tensor(np.array([1, 2, 3]), mindspore.float32)
>>> input_y = Tensor(np.array([4, 5, 6]), mindspore.float32)
>>> input_y = Tensor(np.array([4, 5, 6]), mindspore.float32)
>>> net(input_x, input_y, input_x, input_y)
>>> net(input_x, input_y, input_x, input_y)
Tensor([10, 14, 18], shape=(3,), dtype=mindspore.int32)
[10.0, 14.0, 18.0]
"""
"""
@
prim_attr_register
@
prim_attr_register
...
@@ -2064,9 +2064,9 @@ class Xlogy(_MathBinaryOp):
...
@@ -2064,9 +2064,9 @@ class Xlogy(_MathBinaryOp):
Examples:
Examples:
>>> input_x = Tensor(np.array([-5, 0, 4]), mindspore.float32)
>>> input_x = Tensor(np.array([-5, 0, 4]), mindspore.float32)
>>> input_y = Tensor(np.array([2
, 2,
2]), mindspore.float32)
>>> input_y = Tensor(np.array([2
, 2,
2]), mindspore.float32)
>>> xlogy = P.Xlogy()
>>> xlogy = P.Xlogy()
>>>
X
logy(input_x, input_y)
>>>
x
logy(input_x, input_y)
[-3.465736, 0.0, 2.7725887]
[-3.465736, 0.0, 2.7725887]
"""
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录