(self, x)
| 651 | padding=1) |
| 652 | |
| 653 | def forward(self, x): |
| 654 | # upsampling |
| 655 | h = x |
| 656 | for k, i_level in enumerate(range(self.num_resolutions)): |
| 657 | for i_block in range(self.num_res_blocks + 1): |
| 658 | h = self.res_blocks[i_level][i_block](h, None) |
| 659 | if i_level != self.num_resolutions - 1: |
| 660 | h = self.upsample_blocks[k](h) |
| 661 | h = self.norm_out(h) |
| 662 | h = nonlinearity(h) |
| 663 | h = self.conv_out(h) |
| 664 | return h |
| 665 | |
| 666 | |
| 667 | class LatentRescaler(nn.Module): |
nothing calls this directly
no test coverage detected