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.RunContext.txt 793 B

4 years ago
12345678910111213141516171819202122232425262728293031323334
  1. Class mindspore.train.callback.RunContext(original_args)
  2. 提供模型的相关信息。
  3. 在Model方法里提供模型的相关信息。
  4. 回调函数可以通过调用request_stop()方法来停止循环。
  5. 参数:
  6. original_args (dict):模型的相关信息。
  7. get_stop_requested()
  8. 获取是否停止训练标志。
  9. 返回:
  10. bool,如果为True,则Model.train()停止迭代。
  11. original_args()
  12. 获取模型的相关信息。
  13. 返回:
  14. dict,模型的相关信息。
  15. request_stop()
  16. 在训练期间设置停止请求。
  17. 可以使用此函数请求停止训练。
  18. Model.train()会检查是否调用此函数。