(self, x)
| 639 | padding=1) |
| 640 | |
| 641 | def forward(self, x): |
| 642 | # upsampling |
| 643 | h = x |
| 644 | for k, i_level in enumerate(range(self.num_resolutions)): |
| 645 | for i_block in range(self.num_res_blocks + 1): |
| 646 | h = self.res_blocks[i_level][i_block](h, None) |
| 647 | if i_level != self.num_resolutions - 1: |
| 648 | h = self.upsample_blocks[k](h) |
| 649 | h = self.norm_out(h) |
| 650 | h = nonlinearity(h) |
| 651 | h = self.conv_out(h) |
| 652 | return h |
| 653 | |
| 654 | |
| 655 | class LatentRescaler(nn.Module): |
nothing calls this directly
no test coverage detected