mindspore/docs/api/api_python/parallel/mindspore.parallel.nn.GradA...

16 lines
580 B
ReStructuredText
Raw Permalink 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.parallel.nn.GradAccumulation
============================================================================
.. py:class:: mindspore.parallel.nn.GradAccumulation(network, micro_size)
实现静态图并行梯度累加功能。
参数:
- **network** (Cell) - 将进行梯度累加的网络。
- **micro_size** (int) - MicroBatchSize。
异常:
- **TypeError** - `network` 不是Cell类型输入。
- **TypeError** - `micro_size` 不是整数类型。
- **ValueError** - `micro_size` 值异常为0或者负数。