Raukk / tf-keras-surgeon

Pruning and other network surgery for trained TF.Keras models.
Other
32 stars 9 forks source link

AttributeError: 'Node' object has no attribute 'node_indices' #9

Open JekyllAndHyde8999 opened 4 years ago

JekyllAndHyde8999 commented 4 years ago

I am using Tensorflow 2.3.0 with tfkerassurgeon 0.2.1. While using functions from this library, I get the above mentioned error. Upon inspecting the source code of tensorflow, I find that the Node class does not exist in the library anymore. Below is part of the traceback of the error I received.

File "/usr/local/lib/python3.6/dist-packages/tfkerassurgeon/surgeon.py", line 152, in operate
    sub_output_nodes = utils.get_node_inbound_nodes(node)
  File "/usr/local/lib/python3.6/dist-packages/tfkerassurgeon/utils.py", line 73, in get_node_inbound_nodes
    for i, node_index in enumerate(single_list(node.node_indices))]
AttributeError: 'Node' object has no attribute 'node_indices'
Raukk commented 4 years ago

I'm sorry, between work and life, I have not had the time to maintain this project.

RookieoftheYear commented 3 years ago

@JekyllAndHyde8999 Hi, have you fix that?

BGG19 commented 1 year ago

@JekyllAndHyde8999 hello! I just encountered the same problem with you. Although it's been over 2 years, I still want to know have you fixed the problem since then? I searched it on the Internet and there are some answers about the incompatibility between tf.keras and Keras