(self, x, time_emb)
| 308 | self.res_conv = nn.Conv2d(dim, dim_out, 1) if dim != dim_out else nn.Identity() |
| 309 | |
| 310 | def forward(self, x, time_emb): |
| 311 | b, c, h, w = x.shape |
| 312 | h = self.block1(x) |
| 313 | h = self.noise_func(h, time_emb) |
| 314 | h = self.block2(h) |
| 315 | return h + self.res_conv(x) |
| 316 | |
| 317 | |
| 318 | class SelfAttention(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected