forked from mindspore-Ecosystem/mindspore
pylint clean
This commit is contained in:
parent
f4542f810b
commit
ebbccca78b
|
@ -107,7 +107,7 @@ class TrainStepWrapForAdamDynamicLr(nn.Cell):
|
|||
|
||||
|
||||
class TempC2Wrap(nn.Cell):
|
||||
def __init__(self, op, c1=None, c2=None, ):
|
||||
def __init__(self, op, c1=None, c2=None,):
|
||||
super(TempC2Wrap, self).__init__()
|
||||
self.op = op
|
||||
self.c1 = c1
|
||||
|
@ -387,7 +387,7 @@ test_case_cell_ops = [
|
|||
'block': set_train(nn.Dense(in_channels=768,
|
||||
out_channels=3072,
|
||||
activation='gelu',
|
||||
weight_init=TruncatedNormal(0.02), )),
|
||||
weight_init=TruncatedNormal(0.02),)),
|
||||
'desc_inputs': [[3, 768]],
|
||||
'desc_bprop': [[3, 3072]]}),
|
||||
('GetNextSentenceOutput', {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ============================================================================
|
||||
import numpy as np
|
||||
from collections import Counter
|
||||
import numpy as np
|
||||
|
||||
import mindspore.nn as nn
|
||||
from mindspore import Tensor, Parameter
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
# limitations under the License.
|
||||
# ============================================================================
|
||||
""" test container """
|
||||
from collections import OrderedDict
|
||||
import numpy as np
|
||||
import pytest
|
||||
from collections import OrderedDict
|
||||
|
||||
import mindspore.nn as nn
|
||||
from mindspore import Tensor
|
||||
|
|
|
@ -60,5 +60,5 @@ def test_SoftmaxCrossEntropyExpand():
|
|||
loss = nn.SoftmaxCrossEntropyExpand()
|
||||
|
||||
logits = Tensor(np.random.randint(0, 9, [100, 10]).astype(np.float32))
|
||||
labels = Tensor(np.random.randint(0, 9, [10, ]).astype(np.float32))
|
||||
labels = Tensor(np.random.randint(0, 9, [10,]).astype(np.float32))
|
||||
_executor.compile(loss, logits, labels)
|
||||
|
|
|
@ -54,7 +54,6 @@ def test_parameter_tuple_illegal():
|
|||
|
||||
|
||||
def test_parameter_init_illegal():
|
||||
import numpy as np
|
||||
dat = np.array([[1, 2, 3], [2, 3, 4]])
|
||||
tensor = Tensor(dat)
|
||||
data_none = None
|
||||
|
|
|
@ -13,13 +13,11 @@
|
|||
# limitations under the License.
|
||||
# ============================================================================
|
||||
"""ut for model serialize(save/load)"""
|
||||
import numpy as np
|
||||
import os
|
||||
import pytest
|
||||
import stat
|
||||
import time
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
import mindspore.common.dtype as mstype
|
||||
import mindspore.nn as nn
|
||||
from mindspore import context
|
||||
from mindspore.common.parameter import Parameter
|
||||
|
|
|
@ -20,8 +20,8 @@ Usage:
|
|||
"""
|
||||
|
||||
import argparse
|
||||
import numpy as np
|
||||
import os
|
||||
import numpy as np
|
||||
|
||||
import mindspore.context as context
|
||||
import mindspore.nn as nn
|
||||
|
|
|
@ -17,7 +17,6 @@ import numpy as np
|
|||
from mobilenetv2_combined import MobileNetV2
|
||||
|
||||
import mindspore.context as context
|
||||
import mindspore.ops.operations as P
|
||||
from mindspore import Tensor
|
||||
from mindspore import nn
|
||||
from mindspore.nn.layer import combined
|
||||
|
|
Loading…
Reference in New Issue