Am trying to load a pre-trained Keras model to my small react-App. Since with the 2.0 version of TensorFlow, few things were added and changed. I would like to know how one should load the model from the native file system.
- First I import tensorflowJS
import * as tf from "@tensorflow/tfjs";
My directory structure model.json and all .bin files required are located in the same directory as my App.js from which am referring to them.
Load the pre-trained model - docs
model = await tf.loadLayersModel("file://model.json");
Unfortunately am getting failed to fetch error. Can anyone explain me what am I missing?