I am trying to convert a Keras model and load into React and use it as tensorflow.js
My original Keras model is as follows
model_name:
-- variables
-- keras_metadata.pb
-- saved_model.pb
I then converted it using the following:
tensorflowjs_converter \ --input_format=tf_saved_model \
--saved_model_tags=serve \
model_name \
web_model
The output was a folder that contains
-- group1-shard1of1.bin
-- model.json
I load the model into react
import * as tf from "@tensorflow/tfjs"
const model = await tf.loadGraphModel('model.json')
const predictions = await model.predict(imageElement);
But I get
The error I get is
Unhandled Rejection (Error): The dict provided in model.execute(dict) has keys:
What does it mean and how can I fix it?