Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
decc8404
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看板
提交
decc8404
编写于
4月 29, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
!795 [pylint] clean pylint warning
Merge pull request !795 from jinyaohui/clean_pylint_0428
上级
4f612ae0
73642ef3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
8 deletion
+9
-8
mindspore/model_zoo/vgg.py
mindspore/model_zoo/vgg.py
+1
-0
mindspore/nn/optim/ftrl.py
mindspore/nn/optim/ftrl.py
+0
-1
mindspore/nn/optim/lamb.py
mindspore/nn/optim/lamb.py
+1
-1
tests/mindspore_test_framework/apps/test_bert_parts.py
tests/mindspore_test_framework/apps/test_bert_parts.py
+6
-6
tests/mindspore_test_framework/utils/block_util.py
tests/mindspore_test_framework/utils/block_util.py
+1
-0
未找到文件。
mindspore/model_zoo/vgg.py
浏览文件 @
decc8404
...
...
@@ -61,6 +61,7 @@ class Vgg(nn.Cell):
def
__init__
(
self
,
base
,
num_classes
=
1000
,
batch_norm
=
False
,
batch_size
=
1
):
super
(
Vgg
,
self
).
__init__
()
_
=
batch_size
self
.
layers
=
_make_layer
(
base
,
batch_norm
=
batch_norm
)
self
.
flatten
=
nn
.
Flatten
()
self
.
classifier
=
nn
.
SequentialCell
([
...
...
mindspore/nn/optim/ftrl.py
浏览文件 @
decc8404
...
...
@@ -14,7 +14,6 @@
# ============================================================================
"""FTRL"""
from
mindspore.ops
import
functional
as
F
,
composite
as
C
,
operations
as
P
from
mindspore.common.parameter
import
Parameter
from
mindspore.common
import
Tensor
import
mindspore.common.dtype
as
mstype
from
mindspore._checkparam
import
Validator
as
validator
...
...
mindspore/nn/optim/lamb.py
浏览文件 @
decc8404
...
...
@@ -110,8 +110,8 @@ def _update_run_op(beta1, beta2, eps, lr, weight_decay_tensor, global_step, para
def
_check_param_value
(
decay_steps
,
warmup_steps
,
start_learning_rate
,
end_learning_rate
,
power
,
beta1
,
beta2
,
eps
,
weight_decay
,
prim_name
):
"""Check the type of inputs."""
_
=
warmup_steps
validator
.
check_float_positive
(
'start_learning_rate'
,
start_learning_rate
,
prim_name
)
validator
.
check_float_legal_value
(
'start_learning_rate'
,
start_learning_rate
,
prim_name
)
validator
.
check_float_positive
(
'end_learning_rate'
,
end_learning_rate
,
prim_name
)
...
...
tests/mindspore_test_framework/apps/test_bert_parts.py
浏览文件 @
decc8404
...
...
@@ -173,8 +173,8 @@ test_sets = [
embedding_size
=
768
,
embedding_shape
=
[
1
,
128
,
768
],
use_one_hot_embeddings
=
True
,
initializer_range
=
0.02
),
1
,
1
),
{
'init_param_with'
:
lambda
shp
:
np
.
ones
(
shp
).
astype
(
np
.
float32
)}),
initializer_range
=
0.02
),
1
,
1
),
{
'init_param_with'
:
lambda
shp
:
np
.
ones
(
shp
).
astype
(
np
.
float32
)}),
'desc_inputs'
:
[
input_ids
],
'desc_bprop'
:
[[
128
]]}),
(
'EmbeddingLookup_multi_outputs_init_param'
,
{
...
...
@@ -182,8 +182,8 @@ test_sets = [
embedding_size
=
768
,
embedding_shape
=
[
1
,
128
,
768
],
use_one_hot_embeddings
=
False
,
initializer_range
=
0.02
),
{
'init_param_with'
:
lambda
shp
:
np
.
ones
(
shp
).
astype
(
np
.
float32
)}),
initializer_range
=
0.02
),
{
'init_param_with'
:
lambda
shp
:
np
.
ones
(
shp
).
astype
(
np
.
float32
)}),
'desc_inputs'
:
[
input_ids
],
'desc_bprop'
:
[[
1
,
128
,
768
],
[
128
]]}),
(
'EmbeddingLookup_multi_outputs_grad_with_no_sens'
,
{
...
...
@@ -191,8 +191,8 @@ test_sets = [
embedding_size
=
768
,
embedding_shape
=
[
1
,
128
,
768
],
use_one_hot_embeddings
=
False
,
initializer_range
=
0.02
),
{
'init_param_with'
:
lambda
shp
:
np
.
ones
(
shp
).
astype
(
np
.
float32
)}),
initializer_range
=
0.02
),
{
'init_param_with'
:
lambda
shp
:
np
.
ones
(
shp
).
astype
(
np
.
float32
)}),
'desc_inputs'
:
[
input_ids
]}),
(
'GetMaskedLMOutput_grad_with_no_sens'
,
{
'block'
:
GetMaskedLMOutput
(
BertConfig
(
batch_size
=
1
)),
...
...
tests/mindspore_test_framework/utils/block_util.py
浏览文件 @
decc8404
...
...
@@ -69,6 +69,7 @@ class IthOutputCell(nn.Cell):
return
predict
def
get_output_cell
(
network
,
num_input
,
output_index
,
training
=
True
):
_
=
num_input
net
=
IthOutputCell
(
network
,
output_index
)
set_block_training
(
net
,
training
)
return
net
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录