Browse Source

codecheck warning clean

tags/v1.6.0
liutongtong 4 years ago
parent
commit
e67d7a2648
3 changed files with 5 additions and 0 deletions
  1. +1
    -0
      mindspore/boost/base.py
  2. +3
    -0
      mindspore/nn/loss/loss.py
  3. +1
    -0
      mindspore/run_check/run_check.py

+ 1
- 0
mindspore/boost/base.py View File

@@ -135,6 +135,7 @@ class OptimizerProcess:

return opt


class ParameterProcess:
"""
Process parameter for Boost. Currently, this class supports creating group parameters


+ 3
- 0
mindspore/nn/loss/loss.py View File

@@ -28,6 +28,7 @@ from mindspore._checkparam import Validator as validator
from mindspore._checkparam import Rel
from ... import context


class LossBase(Cell):
"""
Base class for other losses.
@@ -124,6 +125,7 @@ def _check_is_tensor(param_name, input_data, cls_name):
raise TypeError(f"For '{cls_name}', the '{param_name}' should be '{mstype.tensor_type}', "
f"but got '{F.typeof(input_data)}'")


class L1Loss(LossBase):
r"""
L1Loss creates a criterion to measure the mean absolute error (MAE) between :math:`x` and :math:`y` element-wise,
@@ -580,6 +582,7 @@ class SoftmaxCrossEntropyWithLogits(LossBase):
x = self.softmax_cross_entropy(logits, labels)[0]
return self.get_loss(x)


@constexpr
def _check_label_dtype(labels_dtype, cls_name):
"""Internal function, used to check whether the data type of labels meets the requirements."""


+ 1
- 0
mindspore/run_check/run_check.py View File

@@ -19,6 +19,7 @@ mindspore.run_check
The goal is to provide a convenient API to check if the installation is successful or failed.
"""


def _check_mul():
"""
Define the mul method.


Loading…
Cancel
Save