Open niranjanakella opened 1 year ago
import tensorflow as tf
import tensorflow_hub as hub
import cv2
from matplotlib import pyplot as plt
import numpy as np
model = hub.load("https://tfhub.dev/google/movenet/singlepose/lightning/4")
# Get the concrete function of the model
concrete_func = model.signatures[tf.saved_model.DEFAULT_SERVING_SIGNATURE_DEF_KEY]
# Set the input and output tensors
input_tensor_names = [t.name for t in concrete_func.inputs]
output_tensor_names = [t.name for t in concrete_func.outputs]
onnx_model = onnx.load(tf2onnx.tfonnx.process_tf_graph(concrete_func.graph, input_names=input_tensor_names, output_names=output_tensor_names))
# Save the ONNX model
onnx.save(onnx_model, 'model.onnx')
There are also problems with this network conversion!
TypeError: object of type ‘NoneType’ has no len()
Describe the bug
Conversion of TensorFlow model (TF-Hub) to ONNX failed Urgency
a project deployment deadline 7th April 2023
System information
To Reproduce
Link to the model Code instructions to reproduce the behaviour on Google colab environment:
Screenshots
Error Output:
Additional context