tensorflowjs-converter

Error converting keras model to tfjs: duplicate weight name Variable

荒凉一梦 提交于 2019-12-11 18:29:00
问题 Follwing the tutorial at https://www.tensorflow.org/tutorials/images/hub_with_keras resulted in a file model.h5 . Converting to tensorflow-js with the command tensorflowjs_converter --input_format keras ./model.h5 /tmp/jsmodel/ failed with Exception: Error dumping weights, duplicate weight name Variable Why is this and how can it be fixed? MCVE from __future__ import absolute_import, division, print_function import tensorflow as tf import tensorflow_hub as hub from tensorflow.keras import

Loading saved_model causes “Failed to compile fragment shader” for gather op

我是研究僧i 提交于 2019-12-11 04:51:56
问题 I'm using Tensorflow in Python to define and train the model, and then I save it to a saved_model and load it on a website using TensorflowJS. I've made a minimal working example presented below, and have isolated the issue to the gather op. I'm using Windows 7 x64, Python 3.5.2, numpy 1.15.1 (forced upon installing tensorflowjs - had 15.2 before that) and the latest version of tensorflowjs installed using simply pip install tensorflowjs . The browser is Chrome, and it's all served on

Retrain image detection with MobileNet

巧了我就是萌 提交于 2019-11-29 10:56:56
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't convert TensorFlow saved model to tfjs_layers_model webmodel The top two other questions show the

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