MCPcopy Create free account
hub / github.com/FunAudioLLM/FunMusic / __init__

Method __init__

inspiremusic/flow/decoder.py:31–39  ·  view source on GitHub ↗
(self, dim: int, dim_out: int)

Source from the content-addressed store, hash-verified

29
30class CausalBlock1D(Block1D):
31 def __init__(self, dim: int, dim_out: int):
32 super(CausalBlock1D, self).__init__(dim, dim_out)
33 self.block = torch.nn.Sequential(
34 CausalConv1d(dim, dim_out, 3),
35 Transpose(1, 2),
36 nn.LayerNorm(dim_out),
37 Transpose(1, 2),
38 nn.Mish(),
39 )
40
41 def forward(self, x: torch.Tensor, mask: torch.Tensor):
42 output = self.block(x * mask)

Callers

nothing calls this directly

Calls 3

CausalConv1dClass · 0.85
TransposeClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected