I have trained a .h5 model from python , i found the ways to implement it to android , you literally put the model into the resource folder and import some library to call it .
But I can’t find anyway to implement .h5 model into web application . It seems that all tutorials are teaching how to train it in javascript and use it on javascript . But none of them tells people how to implement .h5 into web application .
Answer on any possible ways would be appreciated . But server side/backend implementation would be a plus since I expect it can use the server calculation power instead of the client frontend calculation power .
Thanks for the advice about the converter . It works very well for me . I converted the h5 model and got myself those Json files too .
But now I have have no clue how to implement it , like how to call and use the method on the web … what will be the function name . It would be awesome if you can give me further knowledge or examples on this objective .
I have google myself for the answer , and I find most of the examples revolves around using python to print the web .
This sounds very strange to me , I only have the experience on NodeJS (haven’t touch it for a year already though ) and on hands AJAX for web , building web with python is frontier for me , at best I wish I can use the tools I already learnt , it would be grateful if there are examples on implementing model into AJAX that I haven’t know yet .
In Step 2: Load the model and make a test prediction (clientside) //app.js
...
const modelUrl = 'path/to/model/model.json';
const model = await tf.loadGraphModel(modelUrl);
const zeros = tf.zeros([1, 224, 224, 3]); //change to your original model input data dim
model.predict(zeros).print();