(self)
| 370 | return self.output_conv(h) # (batch, C, H, W) — predicted noise |
| 371 | |
| 372 | def __repr__(self) -> str: |
| 373 | total_params = sum(p.numel() for p in self.parameters()) |
| 374 | trainable_params = sum(p.numel() for p in self.parameters() if p.requires_grad) |
| 375 | return ( |
| 376 | f"UNet(\n" |
| 377 | f" image_size={self.config.image_size}, base_channels={self.config.base_channels},\n" |
| 378 | f" channel_mults={self.config.channel_mults}, num_res_blocks={self.config.num_res_blocks},\n" |
| 379 | f" total_params={total_params:,},\n" |
| 380 | f" trainable_params={trainable_params:,}\n" |
| 381 | f")" |
| 382 | ) |
nothing calls this directly
no outgoing calls
no test coverage detected