facebookresearch / fvcore

Collection of common code that's shared among different research projects in FAIR computer vision team.
Apache License 2.0
2.03k stars 229 forks source link

Update flop counter for matmul to be able to handle broadcasted matrix multiplies #54

Closed anuragarnab closed 3 years ago

anuragarnab commented 3 years ago

Currently, the flop-counter only works for input shapes of [m,n] and [n,p], and its assertions will fail otherwise. However, torch.matmul() can handle [d1, d2 ..., d_k, m, n] and [d1, d2, ..., d_k, n, p] shaped inputs.

facebook-github-bot commented 3 years ago

@ppwwyyxx merged this pull request in facebookresearch/fvcore@f24713bd479b3c6f1baa734e89301e3d345e2879.