MCPcopy
hub / github.com/facebookresearch/encodec / __init__

Method __init__

encodec/modules/conv.py:129–134  ·  view source on GitHub ↗
(self, *args, norm: str = 'none',
                 norm_kwargs: tp.Dict[str, tp.Any] = {}, **kwargs)

Source from the content-addressed store, hash-verified

127 to provide a uniform interface across normalization approaches.
128 """
129 def __init__(self, *args, norm: str = 'none',
130 norm_kwargs: tp.Dict[str, tp.Any] = {}, **kwargs):
131 super().__init__()
132 self.conv = apply_parametrization_norm(nn.Conv2d(*args, **kwargs), norm)
133 self.norm = get_norm_module(self.conv, causal=False, norm=norm, **norm_kwargs)
134 self.norm_type = norm
135
136 def forward(self, x):
137 x = self.conv(x)

Callers

nothing calls this directly

Calls 3

get_norm_moduleFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected