facebookresearch / fvcore

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

add flop counter for mul operation #120

Closed jixiege closed 1 year ago

jixiege commented 1 year ago

Summary: add flop counter for elementwise product between tensors.

Though there is an implementation using elementwise_flop_counter(1) in #99, but it does not support broadcasting to a common shape.

ppwwyyxx commented 1 year ago

Just use elementwise_flop_counter(0, 1). It supports broadcasting.

jixiege commented 1 year ago

Just use elementwise_flop_counter(0, 1). It supports broadcasting.

That's right, should be elementwise_flop_counter(0, 1) instead of elementwise_flop_counter(1).

Thanks for your correct.