mindspore2022/docs/api/api_python/transformer/mindspore.nn.MoEConfig.rst

11 lines
712 B
ReStructuredText
Raw 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.

.. py:class:: mindspore.nn.transformer.MoEConfig(expert_num=1, capacity_factor=1.1, aux_loss_factor=0.05, num_experts_chosen=1, noisy_policy=None, noisy_epsilon=1e-2)
MoE (Mixture of Expert)的配置。
**参数:**
- **expert_num** (int) - 表示使用的专家数量。默认值1。
- **capacity_factor** (float) - 表示专家处理的容量关系其值大于等于1.0。默认值1.1。
- **aux_loss_factor** (float) - 表示负载均衡损失由路由器产生的平衡系数。相乘的结果会加到总损失函数中。此系数的值小于1.0。默认值0.05。
- **num_experts_chosen** (int) - 表示每个标识选择的专家数量。默认值1。