MCPcopy Index your code
hub / github.com/Royalvice/DocDiff / __init__

Method __init__

model/DocDiff.py:158–165  ·  view source on GitHub ↗
(self, n_channels: int, time_channels: int, is_noise: bool = True)

Source from the content-addressed store, hash-verified

156 """
157
158 def __init__(self, n_channels: int, time_channels: int, is_noise: bool = True):
159 super().__init__()
160 self.res1 = ResidualBlock(n_channels, n_channels, time_channels, is_noise=is_noise)
161 self.dia1 = nn.Conv2d(n_channels, n_channels, 3, 1, dilation=2, padding=get_pad(16, 3, 1, 2))
162 self.dia2 = nn.Conv2d(n_channels, n_channels, 3, 1, dilation=4, padding=get_pad(16, 3, 1, 4))
163 self.dia3 = nn.Conv2d(n_channels, n_channels, 3, 1, dilation=8, padding=get_pad(16, 3, 1, 8))
164 self.dia4 = nn.Conv2d(n_channels, n_channels, 3, 1, dilation=16, padding=get_pad(16, 3, 1, 16))
165 self.res2 = ResidualBlock(n_channels, n_channels, time_channels, is_noise=is_noise)
166
167 def forward(self, x: torch.Tensor, t: torch.Tensor):
168 x = self.res1(x, t)

Callers

nothing calls this directly

Calls 3

ResidualBlockClass · 0.85
get_padFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected