flops-counter.pytorch icon indicating copy to clipboard operation
flops-counter.pytorch copied to clipboard

Op Flatten not supported

Open MarkWijkhuizen opened this issue 9 months ago • 1 comments

When computing the macs/params using the get_model_complexity_info function I get the following message using Torch 2.2.1.

Op Flatten is not supported at now, set FLOPs of it to zero

Naturally, the Flatten operator is non-parameterized and should have 0 FLOPs.

Could you add the Flatten operator?

MarkWijkhuizen avatar May 01 '24 07:05 MarkWijkhuizen

Flatten is a manipulation with memory (sometimes even copy is not required), and therefore it does not contribute to the overall number of macs/params. The warnings are printed for further analysis, and for some operations they can be ignored.

sovrasov avatar May 06 '24 08:05 sovrasov