(self, x)
| 732 | padding=1) |
| 733 | |
| 734 | def forward(self, x): |
| 735 | # upsampling |
| 736 | h = x |
| 737 | for k, i_level in enumerate(range(self.num_resolutions)): |
| 738 | for i_block in range(self.num_res_blocks + 1): |
| 739 | h = self.res_blocks[i_level][i_block](h, None) |
| 740 | if i_level != self.num_resolutions - 1: |
| 741 | h = self.upsample_blocks[k](h) |
| 742 | h = self.norm_out(h) |
| 743 | h = nonlinearity(h) |
| 744 | h = self.conv_out(h) |
| 745 | return h |
| 746 | |
| 747 | |
| 748 | class LatentRescaler(nn.Module): |
nothing calls this directly
no test coverage detected