You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Gnanapriya2000, thanks for reporting this. Could you provide some sample code to reproduce this issue? It's possible that you’re trying to load the model with age_model_weights.h5 where the model weights are being saved. You could try saving the model using model.save then loading and converting it to ONNX format.
I am trying to convert the age_model_weights.h5 to onnx .But it give me the following error
ValueError: No model config found in the file at C:\Users\gnanar.deepface\weights\age_model_weights.h5.
This is my code:
import tensorflow as tf
import tf2onnx
import onnx
from tensorflow.keras.models import load_model
Load the Keras model (.h5 file)
model = load_model("age_model_weights.h5")
Convert Keras model to ONNX format
onnx_model, _ = tf2onnx.convert.from_keras(model)
onnx.save(onnx_model, 'age_model.onnx')
print("Model successfully converted to ONNX format!")
The text was updated successfully, but these errors were encountered: