tensorflow.js

Retrain image detection with MobileNet

这一生的挚爱 提交于 2019-11-27 06:16:25
问题 Several ways of retraining MobileNet for use with Tensorflow.js have failed for me. Is there any way to use a retrained model with Tensorflow.js? Both using the modern, hub-based tutorial, as well as using retrain.py seem to fail. Convert output of retrain.py to tensorflow.js Error converting keras model to tfjs: duplicate weight name Variable as well as some other open questions Retrain an Image Classifier in tensorflow js Loading of mobilenet v2 works, but pretrained mobilenet v2 fails Can

getting wrong prediction with custom model after loading save model in tensorflow.js

限于喜欢 提交于 2019-11-26 23:39:46
问题 After compiling and training my custom model, I saved it and got two files such as .bin and .json. Further, I loaded that custom model on another page where I'm giving images as input which I used for training of that model and getting the prediction for those images based on the loaded custom model. Since it works fine for some of the images but returning the wrong prediction for other images. This is my code: $("#predict-button").click(async function(){ let image= $('#selected-image').get(0

Load Tensorflow js model from local file system in javascript

戏子无情 提交于 2019-11-26 21:42:57
问题 I have converted a keras model to tensorflow json format and saved it locally in my computer. I am trying to load that json model in a javascript code using the below command model = await tf.loadModel('web_model') But the model is not getting loaded. Is there a way to load tensorflow json model from local file system? 回答1: I know you're trying to load your model in a browser but if anybody lands here that's trying to do it in Node, here's how: const tf = require("@tensorflow/tfjs"); const