Skip to content

(extract_sub_graph is deprecated and will be removed in a future version) Python API from_keras #2049

Closed
@benquan

Description

@benquan

Describe the bug
When running tf2onnx.convert.from_keras(model) I get the following warning:

WARNING:tensorflow:From /Users/ben/tensorflow/lib/python3.8/site-packages/tf2onnx/tf_loader.py:715: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`

Urgency
Warning

System information

  • MacOS
  • TensorFlow Version: 2.10
  • Python version: 3.8.2

To Reproduce
convert from keras from the python api

  import tf2onnx, onnx
  onnx_model, _ = tf2onnx.convert.from_keras(model)
  onnx.save(onnx_model, "model.onnx")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions