mindspore2022/docs/api/api_python/nn/mindspore.nn.FixedLossScale...

27 lines
801 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.nn.FixedLossScaleUpdateCell
=======================================
.. py:class:: mindspore.nn.FixedLossScaleUpdateCell(loss_scale_value)
固定损失缩放系数的神经元。
该类是 :class:`mindspore.FixedLossScaleManager``get_update_cell` 方法的返回值。训练过程中,类 :class:`mindspore.nn.TrainOneStepWithLossScaleCell` 会调用该Cell。
**参数:**
- **loss_scale_value** (float) - 初始损失缩放系数。
**输入:**
- **loss_scale** (Tensor) - 训练期间的损失缩放系数,是一个标量。在当前类中,该值被忽略。
- **overflow** (bool) - 是否发生溢出。
**输出:**
Bool即输入 `overflow`
.. py:method:: get_loss_scale()
获取当前损失缩放系数。