|
| | __init__ (self, n_globals=21, branch_dim=16, mixer_out=64, n_bypass=12, n_experts=4, expert_bottleneck=32, expert_hidden=128, expert_pool="flat") |
| | forward (self, *inputs, weights=None) |
|
| list | PLANES_PER_TYPE = [4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 4] |
◆ __init__()
| model.ChessNetFactorizedMoE.__init__ |
( |
| self, |
|
|
| n_globals = 21, |
|
|
| branch_dim = 16, |
|
|
| mixer_out = 64, |
|
|
| n_bypass = 12, |
|
|
| n_experts = 4, |
|
|
| expert_bottleneck = 32, |
|
|
| expert_hidden = 128, |
|
|
| expert_pool = "flat" ) |
◆ forward()
| model.ChessNetFactorizedMoE.forward |
( |
| self, |
|
|
* | inputs, |
|
|
| weights = None ) |
◆ branches
| model.ChessNetFactorizedMoE.branches |
Initial value:= nn.ModuleList([
PieceBranch(in_channels=in_ch, mid_channels=branch_dim)
for in_ch in self.PLANES_PER_TYPE
])
◆ expert_pool
| model.ChessNetFactorizedMoE.expert_pool = expert_pool |
◆ experts
| model.ChessNetFactorizedMoE.experts |
Initial value:= nn.ModuleList([
LightExpert(
mixer_channels=mixer_out,
bottleneck_channels=expert_bottleneck,
hidden_dim=expert_hidden,
expert_pool=expert_pool,
) for _ in range(n_experts)
])
◆ mixer_act
| model.ChessNetFactorizedMoE.mixer_act = nn.ReLU(inplace=True) |
◆ n_experts
| model.ChessNetFactorizedMoE.n_experts = n_experts |
◆ PLANES_PER_TYPE
| list model.ChessNetFactorizedMoE.PLANES_PER_TYPE = [4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 4] |
|
static |
◆ pointwise_mixer
| model.ChessNetFactorizedMoE.pointwise_mixer = nn.Conv2d(mixer_in_channels, mixer_out, kernel_size=1) |
◆ stem_global
| model.ChessNetFactorizedMoE.stem_global = nn.Linear(n_globals, mixer_out) |
The documentation for this class was generated from the following file: