(self)
| 304 | return f"dim={self.dim}, input_resolution={self.input_resolution}, depth={self.depth}" |
| 305 | |
| 306 | def flops(self): |
| 307 | flops = 0 |
| 308 | for blk in self.blocks: |
| 309 | flops += blk.flops() |
| 310 | if self.downsample is not None: |
| 311 | flops += self.downsample.flops() |
| 312 | return flops |
| 313 | |
| 314 | |
| 315 | class PatchEmbed(nn.Module): |