MCPcopy Create free account
hub / github.com/GuoLanqing/ShadowFormer / flops

Method flops

model.py:882–894  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

880 return x
881
882 def flops(self):
883 flops = 0
884 H, W = self.input_resolution
885 # norm1
886 flops += self.dim * H * W
887 # W-MSA/SW-MSA
888 flops += self.attn.flops(H, W)
889 # norm2
890 flops += self.dim * H * W
891 # mlp
892 flops += self.mlp.flops(H,W)
893 print("LeWin:{%.2f}"%(flops/1e9))
894 return flops
895
896
897#########################################

Callers

nothing calls this directly

Calls 1

flopsMethod · 0.45

Tested by

no test coverage detected