You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.train.callback.LossMonitor.rst 611 B

4 years ago
4 years ago
12345678910111213141516171819202122232425
  1. .. py:class:: mindspore.train.callback.LossMonitor(per_print_times=1)
  2. 监控训练的loss。
  3. 如果loss是NAN或INF,则终止训练。
  4. .. note::
  5. 如果 `per_print_times` 为0,则不打印loss。
  6. **参数:**
  7. - **per_print_times** (int) - 表示每隔多少个step打印一次loss。默认值:1。
  8. **异常:**
  9. - **ValueError** - 当 `per_print_times` 不是整数或小于零。
  10. .. py:method:: step_end(run_context)
  11. step结束时打印训练loss。
  12. **参数:**
  13. - **run_context** (RunContext) - 包含模型的相关信息。