-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the flops of TensorFlow.js model #7427
Comments
Is there an API to get Gflops directly? |
Hi, @lebron8dong Apologize for the delay and As far I know, there is no straight forward API available in the |
@gaikwadrahul8 thanks,Does TensorFlow.js have an API that can calculate flops? |
@gaikwadrahul8 Is there any other way to get the flops of TensorFlow.js model? |
Hi, @lebron8dong Apologize for the delayed response and as far I know there is no API available in the You'll have to do something like below in TFJS which is already done for tensorflow model:
I would suggest you to please refer these 02 issues #32809, #17273 which will help you to calculate flops in the TFJS and if you're looking FLOPS calculation API in TFJS then we'll consider this issue as feature request because at the moment we don't have straight forward API like keras or Tensorflow in TFJS so Would you like to consider this issue as feature request or not? Thank you! |
@gaikwadrahul8 Yes,I would like to consider this issue as feature request. |
Thank you for the confirmation and we'll consider this issue as feature request and I'll forward this issue to respective team so they'll take appropriate action from their end. Thank you! |
@gaikwadrahul8 |
Hi, @Linchenn Could you please look into this issue ? Thank you! |
I have a question about the script you shared. It seems like getting MACs? Why do we divide by 2 for getting FLOPs by the way? flops = graph_info.total_float_ops // 2 |
I can't get flops through tf.profile like TensorFlow, the api of tf.profile is different from tf.
The text was updated successfully, but these errors were encountered: