@ -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)
@ -17,7 +17,9 @@ 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
@ -17,6 +17,7 @@ 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
@ -14,8 +14,8 @@
# ============================================================================
""" test_graph_summary """
import logging
import numpy as np
from mindspore import Model, context
@ -15,9 +15,9 @@
"""Test histogram summary."""
import tempfile
from mindspore.common.tensor import Tensor
from mindspore.train.summary._summary_adapter import _calc_histogram_bins
@ -19,8 +19,8 @@
@Desc : test summary function
"""
@ -19,10 +19,11 @@
import random
@Desc : test summary function of abnormal input
from mindspore.train.summary.summary_record import SummaryRecord
@ -13,10 +13,10 @@
# limitations under the License.
"""test callback function."""
@ -14,9 +14,9 @@
""" test_initializer """
import math
from functools import reduce
import pytest as py
from scipy import stats
import mindspore as ms
@ -13,11 +13,11 @@
"""ut for model serialize(save/load)"""