Reputation: 4839
I have a pre trained tfjs model and I would like to load it into python using keras / tensorflow
I found how to convert a tf and a keras model to tfjs models. And how to load tfjs model using js,
How can I load the model into python?
Upvotes: 5
Views: 1921
Reputation: 1635
You can save the tfjs model from JS using the model save API.
You can then convert the model into a python compatible format using the tfjs-converter. Finally, you should be able to use load_model in python using the keras load model API.
tf.keras.models.load_model(
filepath,
custom_objects=None,
compile=True
)
Upvotes: 3