-
Notifications
You must be signed in to change notification settings - Fork 436
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
AttributeError: 'FuncGraph' object has no attribute '_captures' #2172
Comments
This looks like an issue of tensorflow. Could you please lower down your python version to 3.9 so that you can install different versions of tensorflow for a retry? |
We have a dependency on python 3.11 for a few other things, is support for this version of python and newer versions of TensorFlow something that's in the works? |
This is a compatibility issue between Python and TensorFlow 2.11.1, so tf2onnx can't help on it. Do you mind to try a newer TensorFlow version on Python 3.11? |
I believe 2.13.0rc0 is the latest? (it is also the only version selectable in pip3 install) |
Yes, it should be the latest rc version. |
That's the one I used above in the issue report. It's the only one that's available for python 3.11. |
I have the same problem; my Tensorflow version is 2.13.0 (Python 3.9). |
@rgaufman This problem can be fixed by replacing: graph_captures = concrete_func.graph._captures to if hasattr(concrete_func.graph, "captures"):
graph_captures = concrete_func.graph.captures
captured_inputs = [t_name.name for t_val, t_name in graph_captures]
else:
graph_captures = concrete_func.graph._captures
captured_inputs = [t_name.name for t_val, t_name in graph_captures.values()] |
I got the same problem. It worked when I decreased the tensorflow version to 2.12.1 |
@rgaufman were you able to find a solution? |
@guoqingbao Do you consider a pull request for your fix? I discovered this after posting another fix for the same issue at #2180 (comment), and your fix looks better than mine. |
Sure, I have created a pull request to fix this issue. |
This worked for me.
|
Describe the bug
I installed tf2onnx.convert with (I also tried the stable version, same result):
When I run it, I see:
System information
To Reproduce
I'm following the instructions here: https://ankane.org/tensorflow-ruby - I downloaded this pre-trained model: https://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_2018_01_28.tar.gz and trying to convert it to onnx format.
Unfortunately I am not able to install any other versions of tensorflow, only 2.13.0rc0 appears to be available:
The text was updated successfully, but these errors were encountered: