mindspore/docs/api/api_python/nn/mindspore.nn.PipelineCell.rst

17 lines
432 B
ReStructuredText
Raw Normal View History

2021-12-04 15:18:50 +08:00
.. py:class:: mindspore.nn.PipelineCell(network, micro_size)
将MiniBatch切分成更细粒度的MicroBatch用于流水线并行的训练中。
.. note::
micro_size必须大于或等于流水线stage的个数。
** 参数:**
2021-12-04 20:36:47 +08:00
- **network** (Cell) - 要修饰的目标网络。
- **micro_size** (int) - MicroBatch大小。
2021-12-04 15:18:50 +08:00
**示例:**
>>> net = Net()
>>> net = PipelineCell(net, 4)