MCPcopy
hub / github.com/yerfor/GeneFacePlusPlus / __init__

Method __init__

modules/audio2motion/flow_base.py:671–694  ·  view source on GitHub ↗
(self,
                 channels,
                 hidden_channels,
                 kernel_size,
                 dilation_rate,
                 n_layers,
                 n_flows=4,
                 gin_channels=0,
                 nn_type='wn')

Source from the content-addressed store, hash-verified

669
670class ResidualCouplingBlock(nn.Module):
671 def __init__(self,
672 channels,
673 hidden_channels,
674 kernel_size,
675 dilation_rate,
676 n_layers,
677 n_flows=4,
678 gin_channels=0,
679 nn_type='wn'):
680 super().__init__()
681 self.channels = channels
682 self.hidden_channels = hidden_channels
683 self.kernel_size = kernel_size
684 self.dilation_rate = dilation_rate
685 self.n_layers = n_layers
686 self.n_flows = n_flows
687 self.gin_channels = gin_channels
688
689 self.flows = nn.ModuleList()
690 for i in range(n_flows):
691 self.flows.append(
692 ResidualCouplingLayer(channels, hidden_channels, kernel_size, dilation_rate, n_layers,
693 gin_channels=gin_channels, mean_only=True, nn_type=nn_type))
694 self.flows.append(Flip())
695
696 def forward(self, x, x_mask, g=None, reverse=False):
697 if not reverse:

Callers

nothing calls this directly

Calls 4

FlipClass · 0.85
appendMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected