Skip to content
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

Seems broken in tf 2.13? #17

Open
Vandertic opened this issue Aug 18, 2023 · 1 comment
Open

Seems broken in tf 2.13? #17

Vandertic opened this issue Aug 18, 2023 · 1 comment

Comments

@Vandertic
Copy link

On a clean install of tf 2.13 with python 3.9 on Ubuntu (following pip guide that uses conda),

from keras_flops import get_flops

fails with

KeyError: "Registering two statistical functions with name 'AddV2,flops'! (Previous registration was in register /home/name/miniconda3/envs/tf-2.13/lib/python3.9/site-packages/tensorflow/python/framework/registry.py:65)"

@swapnilsayansaha
Copy link

swapnilsayansaha commented Aug 25, 2023

Comment out the following lines in the file /home/name/miniconda3/envs/tf-2.13/lib/python3.9/site-packages/keras_flops/flops_registory.py

@ops.RegisterStatistics("AddV2", "flops")
def _flops_add(graph, node):
 """inference is supportted"""
return _binary_per_element_op_flops(graph, node)

The library works fine without these lines and still gives the same calculation results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants