MCPcopy Create free account
hub / github.com/ImprintLab/MedSegDiff / count_flops_attn

Function count_flops_attn

guided_diffusion/unet.py:373–390  ·  view source on GitHub ↗

A counter for the `thop` package to count the operations in an attention operation. Meant to be used like: macs, params = thop.profile( model, inputs=(inputs, timestamps), custom_ops={QKVAttention: QKVAttention.count_flops}, )

(model, _x, y)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

count_flopsMethod · 0.85
count_flopsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected