pylint clean

This commit is contained in:
“liuxiao” 2020-05-25 21:16:04 +08:00
parent 18f0af0529
commit 382a0124c3
6 changed files with 4 additions and 7 deletions

View File

@ -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)

View File

@ -17,9 +17,7 @@ import numpy as np
import os
import pytest
import stat
import time
import mindspore.common.dtype as mstype
import mindspore.nn as nn
from mindspore import context
from mindspore.common.parameter import Parameter

View File

@ -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

View File

@ -127,7 +127,7 @@ def test_scalar_summary_sample_with_shape_1():
class SummaryDemo(nn.Cell):
""" SummaryDemo definition """
def __init__(self, ):
def __init__(self,):
super(SummaryDemo, self).__init__()
self.s = P.ScalarSummary()
self.histogram_summary = P.HistogramSummary()

View File

@ -110,7 +110,7 @@ def get_test_data_check(step):
class SummaryDemo(nn.Cell):
""" SummaryDemo definition """
def __init__(self, ):
def __init__(self,):
super(SummaryDemo, self).__init__()
self.s = P.TensorSummary()
self.add = P.TensorAdd()

View File

@ -31,7 +31,7 @@ from mindspore.ops import operations as P
from mindspore.train.callback import _CheckpointManager
from mindspore.train.serialization import save_checkpoint, load_checkpoint, load_param_into_net, \
_exec_save_checkpoint, export, _save_graph
from ..ut_filter import run_on_onnxruntime, non_graph_engine
from ..ut_filter import non_graph_engine
context.set_context(mode=context.GRAPH_MODE)