(self, z, **kwargs)
| 457 | return self.conv_out.weight |
| 458 | |
| 459 | def forward(self, z, **kwargs): |
| 460 | # Timestep embedding |
| 461 | temb = None |
| 462 | |
| 463 | h = self.conv_in(z) |
| 464 | |
| 465 | h = self.mid.block_1(h, temb, **kwargs) |
| 466 | h = self.mid.attn_1(h, **kwargs) |
| 467 | h = self.mid.block_2(h, temb, **kwargs) |
| 468 | |
| 469 | # Upsampling |
| 470 | for i_level in reversed(range(self.num_resolutions)): |
| 471 | for i_block in range(self.num_res_blocks + 1): |
| 472 | h = self.up[i_level].block[i_block](h, temb, **kwargs) |
| 473 | if len(self.up[i_level].attn) > 0: |
| 474 | h = self.up[i_level].attn[i_block](h, **kwargs) |
| 475 | if i_level != 0: |
| 476 | h = self.up[i_level].upsample(h) |
| 477 | |
| 478 | if not self.give_pre_end: |
| 479 | h = self.norm_out(h) |
| 480 | h = nonlinearity(h) |
| 481 | h = self.conv_out(h, **kwargs) |
| 482 | if self.tanh_out: |
| 483 | h = torch.tanh(h) |
| 484 | return h |
nothing calls this directly
no test coverage detected