Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

'KerasTensor' object has no attribute 'graph' #724

Open
hexate opened this issue Jun 8, 2021 · 1 comment
Open

'KerasTensor' object has no attribute 'graph' #724

hexate opened this issue Jun 8, 2021 · 1 comment

Comments

@hexate
Copy link

hexate commented Jun 8, 2021

I am having an issue when trying to convert my model to onnx.

I see this error:
'KerasTensor' object has no attribute 'graph'

while trying to run this:
onnx_model = keras2onnx.convert_keras(model, model.name)

It worked fine with tf 2.3, but it was running on CPU. I upgraded to tf 2.5, and the model trains on GPU now, but my script fails when trying to export to Onnx. I am working with an LSTM model.

versions:
Python: 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)]
Tensorflow Gpu Version: 2.5.0
Keras Version: 2.5.0
Hub Version: 0.12.0
Datasets Version: 4.3.0
cuDNN version: 64_8
Cuda version: 64_112

@LaCandela
Copy link

Same here. I used TF v2.3 instead of v2.5, that solved the issue but now I cannot use the GPU...

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

No branches or pull requests

2 participants