(self)
| 72 | return x |
| 73 | |
| 74 | def flops(self) -> float: |
| 75 | Ho, Wo = self.patches_resolution |
| 76 | flops = Ho * Wo * self.embed_dim * self.in_chans * (self.patch_size[0] * self.patch_size[1]) |
| 77 | if self.norm is not None: |
| 78 | flops += Ho * Wo * self.embed_dim |
| 79 | return flops |
nothing calls this directly
no outgoing calls
no test coverage detected