MCPcopy
hub / github.com/microsoft/Swin-Transformer / flops

Method flops

models/swin_mlp.py:461–468  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

459 return x
460
461 def flops(self):
462 flops = 0
463 flops += self.patch_embed.flops()
464 for i, layer in enumerate(self.layers):
465 flops += layer.flops()
466 flops += self.num_features * self.patches_resolution[0] * self.patches_resolution[1] // (2 ** self.num_layers)
467 flops += self.num_features * self.num_classes
468 return flops

Callers 5

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
flopsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected