!21851 Fix comments in LossBase.get_loss()

Merge pull request !21851 from chenhaozhe/code_docs_change_lossBase_getloss
This commit is contained in:
i-robot 2021-08-17 03:12:33 +00:00 committed by Gitee
commit b6fb8cd8d6
1 changed files with 2 additions and 2 deletions

View File

@ -76,8 +76,8 @@ class LossBase(Cell):
Args:
weights (Union[float, Tensor]): Optional `Tensor` whose rank is either 0, or the same rank as inputs,
and must be broadcastable to inputs (i.e., all dimensions must be either `1`,
or the same as the corresponding inputs dimension).
and must be broadcastable to inputs (i.e., all dimensions must be either `1`,
or the same as the corresponding inputs dimension).
"""
input_dtype = x.dtype
x = self.cast(x, mstype.float32)