Skip to content

Is it possible to add a decode_predictions layer to converted Keras models? #2257

Open
@george-synx

Description

@george-synx

Ask a Question

In the example notebook for converting keras CV models (https://github.com/onnx/tensorflow-onnx/blob/main/tutorials/keras-resnet50.ipynb) the keras method decode_predictions is used to translate the outputs of both the keras model and ONNX model. I'm not interested in the gradients and would like the decoded predictions in ONNX without having to import keras, is this possible? My downstream plan is to deploy the ONNX model via TensorRT, and currently it doesn't like the gradient outputs.

Further information

  • Is this issue related to a specific model?
    I am using a Keras CV retinanet for object detection, with a ResNet50 backbone, however the question stands for all CV style networks

Model opset: 15

Notes

https://github.com/onnx/tensorflow-onnx/blob/main/tutorials/keras-resnet50.ipynb

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending on user responseWaiting for more information or validation from userquestionAn issue, pull request, or discussion needs more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions