Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
9c858444
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看板
提交
9c858444
编写于
5月 28, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
5月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
!1568 Fix pylint warning for test cases of optimizer, infer, parse and pynative.
Merge pull request !1568 from seatea/fix-pylint-warning
上级
1a4abefa
7398526a
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
11 addition
and
13 deletion
+11
-13
tests/ut/cpp/python_input/gtest_input/optimizer/ad/ad_test.py
...s/ut/cpp/python_input/gtest_input/optimizer/ad/ad_test.py
+1
-1
tests/ut/cpp/python_input/gtest_input/optimizer/opt_test.py
tests/ut/cpp/python_input/gtest_input/optimizer/opt_test.py
+1
-1
tests/ut/cpp/python_input/gtest_input/pipeline/parse/parser_integrate.py
...thon_input/gtest_input/pipeline/parse/parser_integrate.py
+2
-2
tests/ut/cpp/python_input/gtest_input/session/session_test.py
...s/ut/cpp/python_input/gtest_input/session/session_test.py
+1
-1
tests/ut/python/pipeline/infer/infer.py
tests/ut/python/pipeline/infer/infer.py
+1
-1
tests/ut/python/pipeline/infer/test_hypermap_specialize.py
tests/ut/python/pipeline/infer/test_hypermap_specialize.py
+1
-1
tests/ut/python/pipeline/parse/test_for_stmt.py
tests/ut/python/pipeline/parse/test_for_stmt.py
+1
-1
tests/ut/python/pipeline/parse/test_operator.py
tests/ut/python/pipeline/parse/test_operator.py
+1
-1
tests/ut/python/pipeline/parse/test_parse.py
tests/ut/python/pipeline/parse/test_parse.py
+0
-1
tests/ut/python/pynative_mode/nn/test_activation.py
tests/ut/python/pynative_mode/nn/test_activation.py
+0
-1
tests/ut/python/pynative_mode/nn/test_cell.py
tests/ut/python/pynative_mode/nn/test_cell.py
+1
-1
tests/ut/python/pynative_mode/nn/test_container.py
tests/ut/python/pynative_mode/nn/test_container.py
+1
-1
未找到文件。
tests/ut/cpp/python_input/gtest_input/optimizer/ad/ad_test.py
浏览文件 @
9c858444
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# ============================================================================
# ============================================================================
import
numpy
as
np
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
import
numpy
as
np
import
mindspore
as
ms
import
mindspore
as
ms
from
mindspore.common.tensor
import
Tensor
from
mindspore.common.tensor
import
Tensor
...
...
tests/ut/cpp/python_input/gtest_input/optimizer/opt_test.py
浏览文件 @
9c858444
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
import
numpy
as
np
import
numpy
as
np
from
mindspore
import
Tensor
from
mindspore
import
Tensor
from
mindspore.ops
import
Primitive
,
PrimitiveWithInfer
from
mindspore.ops
import
Primitive
from
mindspore.ops
import
operations
as
P
from
mindspore.ops
import
operations
as
P
from
mindspore.ops.operations
import
_grad_ops
as
G
from
mindspore.ops.operations
import
_grad_ops
as
G
...
...
tests/ut/cpp/python_input/gtest_input/pipeline/parse/parser_integrate.py
浏览文件 @
9c858444
...
@@ -136,8 +136,8 @@ class Net(nn.Cell):
...
@@ -136,8 +136,8 @@ class Net(nn.Cell):
super
(
Net
,
self
).
__init__
()
super
(
Net
,
self
).
__init__
()
self
.
conv
=
nn
.
Conv2d
(
3
,
64
,
3
,
bias_init
=
'zeros'
)
self
.
conv
=
nn
.
Conv2d
(
3
,
64
,
3
,
bias_init
=
'zeros'
)
def
construct
(
self
,
input
):
def
construct
(
self
,
input
s
):
return
self
.
conv
(
input
)
return
self
.
conv
(
input
s
)
class
TestNet
(
nn
.
Cell
):
class
TestNet
(
nn
.
Cell
):
...
...
tests/ut/cpp/python_input/gtest_input/session/session_test.py
浏览文件 @
9c858444
...
@@ -25,7 +25,7 @@ max_pool = P.MaxPoolWithArgmax(padding="same", ksize=3, strides=2)
...
@@ -25,7 +25,7 @@ max_pool = P.MaxPoolWithArgmax(padding="same", ksize=3, strides=2)
def
test_addn_cast
(
x
,
y
,
z
):
def
test_addn_cast
(
x
,
y
,
z
):
mysum
=
addn
((
x
,
y
))
mysum
=
addn
((
x
,
y
,
z
))
res
=
cast
(
mysum
,
ms
.
float16
)
res
=
cast
(
mysum
,
ms
.
float16
)
return
res
return
res
...
...
tests/ut/python/pipeline/infer/infer.py
浏览文件 @
9c858444
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
# ============================================================================
# ============================================================================
""" infer """
""" infer """
import
numpy
as
np
from
argparse
import
ArgumentParser
from
argparse
import
ArgumentParser
import
numpy
as
np
from
mindspore
import
Tensor
from
mindspore
import
Tensor
from
....dataset_mock
import
MindData
from
....dataset_mock
import
MindData
...
...
tests/ut/python/pipeline/infer/test_hypermap_specialize.py
浏览文件 @
9c858444
...
@@ -53,4 +53,4 @@ def test_hypermap_specialize_param():
...
@@ -53,4 +53,4 @@ def test_hypermap_specialize_param():
expected_ret
=
(
Tensor
(
np
.
full
(
1
,
5
).
astype
(
np
.
int32
)),
Tensor
(
np
.
full
(
2
,
5
).
astype
(
np
.
int32
)))
expected_ret
=
(
Tensor
(
np
.
full
(
1
,
5
).
astype
(
np
.
int32
)),
Tensor
(
np
.
full
(
2
,
5
).
astype
(
np
.
int32
)))
ret
=
hypermap_specialize_param
()
ret
=
hypermap_specialize_param
()
assert
(
ret
==
(
expected_ret
,
expected_ret
)
)
assert
ret
==
(
expected_ret
,
expected_ret
)
tests/ut/python/pipeline/parse/test_for_stmt.py
浏览文件 @
9c858444
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
# ============================================================================
# ============================================================================
""" test_for_stmt """
""" test_for_stmt """
import
numpy
as
np
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
import
numpy
as
np
from
mindspore
import
Tensor
,
Model
,
context
from
mindspore
import
Tensor
,
Model
,
context
from
mindspore.nn
import
Cell
from
mindspore.nn
import
Cell
...
...
tests/ut/python/pipeline/parse/test_operator.py
浏览文件 @
9c858444
...
@@ -163,7 +163,7 @@ def test_ops():
...
@@ -163,7 +163,7 @@ def test_ops():
ret_floor
=
p
//
q
+
q
//
p
ret_floor
=
p
//
q
+
q
//
p
ret
=
ret_pow
+
ret_mod
+
ret_floor
ret
=
ret_pow
+
ret_mod
+
ret_floor
if
self
.
int
>
self
.
float
:
if
self
.
int
>
self
.
float
:
if
[
1
,
2
,
3
]
!=
None
:
if
[
1
,
2
,
3
]
is
not
None
:
if
self
.
str_a
+
self
.
str_b
==
"helloworld"
:
if
self
.
str_a
+
self
.
str_b
==
"helloworld"
:
if
q
==
86
:
if
q
==
86
:
print
(
"hello world"
)
print
(
"hello world"
)
...
...
tests/ut/python/pipeline/parse/test_parse.py
浏览文件 @
9c858444
...
@@ -25,7 +25,6 @@ import mindspore as ms
...
@@ -25,7 +25,6 @@ import mindspore as ms
import
mindspore.nn
as
nn
import
mindspore.nn
as
nn
from
mindspore
import
Tensor
from
mindspore
import
Tensor
from
mindspore.common.api
import
ms_function
,
_executor
from
mindspore.common.api
import
ms_function
,
_executor
from
mindspore.ops.composite
import
core
from
mindspore.ops.functional
import
tensor_add
from
mindspore.ops.functional
import
tensor_add
from
...ut_filter
import
non_graph_engine
from
...ut_filter
import
non_graph_engine
...
...
tests/ut/python/pynative_mode/nn/test_activation.py
浏览文件 @
9c858444
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# ============================================================================
# ============================================================================
""" test Activations """
""" test Activations """
import
numpy
as
np
import
numpy
as
np
import
pytest
import
mindspore.nn
as
nn
import
mindspore.nn
as
nn
from
mindspore
import
Tensor
from
mindspore
import
Tensor
...
...
tests/ut/python/pynative_mode/nn/test_cell.py
浏览文件 @
9c858444
...
@@ -305,4 +305,4 @@ def test_net_call():
...
@@ -305,4 +305,4 @@ def test_net_call():
net
=
ConvNet
()
net
=
ConvNet
()
input_x
=
Tensor
(
input_x
=
Tensor
(
np
.
random
.
randint
(
0
,
255
,
[
1
,
3
,
net
.
image_h
,
net
.
image_w
]).
astype
(
np
.
float32
))
np
.
random
.
randint
(
0
,
255
,
[
1
,
3
,
net
.
image_h
,
net
.
image_w
]).
astype
(
np
.
float32
))
output
=
net
.
construct
(
input_x
)
net
.
construct
(
input_x
)
tests/ut/python/pynative_mode/nn/test_container.py
浏览文件 @
9c858444
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
# limitations under the License.
# limitations under the License.
# ============================================================================
# ============================================================================
""" test_container """
""" test_container """
from
collections
import
OrderedDict
import
numpy
as
np
import
numpy
as
np
import
pytest
import
pytest
from
collections
import
OrderedDict
import
mindspore.nn
as
nn
import
mindspore.nn
as
nn
from
mindspore
import
Tensor
from
mindspore
import
Tensor
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录