!30172 Add chinese api for ms_memory_recycle

Merge pull request !30172 from huangbingjian/code_docs_memory
This commit is contained in:
i-robot 2022-02-17 10:42:52 +00:00 committed by Gitee
commit abe8b8422a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 3 deletions

View File

@ -134,8 +134,5 @@ mindspore
.. mscnautosummary::
:toctree: mindspore
:nosignatures:
:template: classtemplate.rst
mindspore.ms_memory_recycle

View File

@ -0,0 +1,10 @@
mindspore.ops.ms_memory_recycle
================================
.. py:function:: mindspore.ops.ms_memory_recycle()
回收MindSpore使用的内存。
在一个进程中训练多个神经网络模型时MindSpore使用的内存非常大这是因为MindSpore为每个模型缓存了运行时的内存。
为了回收这些缓存的内存,用户可以在训练一个模型后调用这个函数。