MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / __init__

Method __init__

architecture/autoencoder_kl_wan.py:38–53  ·  view source on GitHub ↗
(
        self,
        in_channels,
        out_channels,
        factor_t,
        factor_s=1,
    )

Source from the content-addressed store, hash-verified

36
37class AvgDown3D(nn.Module):
38 def __init__(
39 self,
40 in_channels,
41 out_channels,
42 factor_t,
43 factor_s=1,
44 ):
45 super().__init__()
46 self.in_channels = in_channels
47 self.out_channels = out_channels
48 self.factor_t = factor_t
49 self.factor_s = factor_s
50 self.factor = self.factor_t * self.factor_s * self.factor_s
51
52 assert in_channels * self.factor % out_channels == 0
53 self.group_size = in_channels * self.factor // out_channels
54
55 def forward(self, x: torch.Tensor) -> torch.Tensor:
56 pad_t = (self.factor_t - x.shape[2] % self.factor_t) % self.factor_t

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected