MCPcopy Create free account
hub / github.com/PrathamLearnsToCode/paper2code / __repr__

Method __repr__

skills/paper2code/worked/ddpm/src/model.py:372–382  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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 )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected