(self, n_channels: int, time_channels: int, is_noise: bool = True)
| 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) |
nothing calls this directly
no test coverage detected