Browse Source

Modify error white list for master

tags/v1.6.0
liuyang_655 4 years ago
parent
commit
c53c22ea20
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      mindspore/common/initializer.py
  2. +1
    -1
      mindspore/train/model.py

+ 1
- 1
mindspore/common/initializer.py View File

@@ -502,7 +502,7 @@ def initializer(init, shape=None, dtype=mstype.float32):
>>> tensor3 = initializer(0, [1, 2, 3], mindspore.float32)
"""
if not isinstance(init, (Tensor, numbers.Number, str, Initializer)):
raise TypeError("The type of the 'init' argument should be 'Tensor', 'number', 'str' "
raise TypeError("The type of the 'init' argument should be 'Tensor', 'number', 'string' "
"or 'initializer', but got {}.".format(type(init)))

if isinstance(init, Tensor):


+ 1
- 1
mindspore/train/model.py View File

@@ -257,7 +257,7 @@ class Model:
if eval_network is not None:
if eval_indexes is not None and not (isinstance(eval_indexes, list) and len(eval_indexes) == 3):
raise ValueError("The argument 'eval_indexes' must be a list or None. If 'eval_indexes' is a list, "
"length of it must be three. But got {}".format(len(eval_indexes)))
"length of it must be three. But got 'eval_indexes' {}".format(eval_indexes))

self._eval_network = eval_network
self._eval_indexes = eval_indexes


Loading…
Cancel
Save