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

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

@hexate

Description

@hexate

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions