toco

TensorFlow Lite conversion

青春壹個敷衍的年華 提交于 2020-01-25 06:59:08
问题 I'm working with the Raspberry pi 4, to create an image detection model. I need to turn the model into a lite version since I'm installing it on a card called JeVois. I have Tensorflow 1.13.1 for Raspberry Pi. And, My problem is the following : I finished the training stage and I made the following steps to export the model in lite format: python3 export_inference_graph.py --input_type image_tensor --pipeline_config_path training/ssd_mobilenet_v1.config --trained_checkpoint_prefix training

TFLite Conversion changing model weights

我的梦境 提交于 2019-12-11 18:48:32
问题 I have a custom built tensorflow graph implementing MobileNetV2-SSDLite which I implemented myself. It is working fine on the PC. However, when I convert the model to TFLite (all float, no quantization), the model weights are changed drastically. To give an example, a filter which was initially - 0.13172674179077148, 2.3185202252437188e-32, -0.003990101162344217 becomes- 4.165565013885498, -2.3981268405914307, -1.1919032335281372 The large weight values are completely throwing off my on

Trying to convert TensorFlow model to TensorFlow lite, when running toco --help gives me an error

别等时光非礼了梦想. 提交于 2019-12-11 17:49:12
问题 I am on Windows 10, python 2.7, tensorflow 1.7. When attempting to call toco - "toco --help", gives me the next error. File "appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "AppData\Local\Programs\Python\Python36\Scripts\toco.exe\__main__.py", line 5, in <module> ModuleNotFoundError: No module named 'tensorflow.contrib.lite

Error converting Facenet model .pb file to TFLITE format

孤者浪人 提交于 2019-12-09 23:57:54
问题 i'm trying to convert a pre-trained frozen .pb based on Inception ResNet i got from David Sandbergs Github with the Tensorflow Lite Converter on Ubuntu using the following command: /home/nils/.local/bin/tflite_convert --output_file=/home/nils/Documents/frozen.tflite --graph_def_file=/home/nils/Documents/20180402-114759/20180402-114759.pb --input_arrays=input --output_arrays=embeddings --input_shapes=1,160,160,3 However, i get the following error: 2018-12-03 15:03:16.807431: I tensorflow/core

Tensorflow lite model is giving wrong output

好久不见. 提交于 2019-12-07 22:19:22
问题 I am developing a deep learning model with regression predicts. I created a tflite model but its predictions are different from original model and they are fully wrong.. Here is my process: I trained my model with keras model = Sequential() model.add(Dense(100, input_dim=x.shape[1], activation='relu')) # Hidden 1 model.add(Dense(50, activation='relu')) # Hidden 2 model.add(Dense(1)) # Output model.compile(loss='mean_squared_error', optimizer='adam') model.fit(x,y,verbose=0,epochs=500) And

Tensorflow lite model is giving wrong output

岁酱吖の 提交于 2019-12-06 14:32:09
I am developing a deep learning model with regression predicts. I created a tflite model but its predictions are different from original model and they are fully wrong.. Here is my process: I trained my model with keras model = Sequential() model.add(Dense(100, input_dim=x.shape[1], activation='relu')) # Hidden 1 model.add(Dense(50, activation='relu')) # Hidden 2 model.add(Dense(1)) # Output model.compile(loss='mean_squared_error', optimizer='adam') model.fit(x,y,verbose=0,epochs=500) And saved my model as h5 file model.save("keras_model.h5") Then converted h5 file to tflile format by

Error converting Facenet model .pb file to TFLITE format

久未见 提交于 2019-12-04 20:36:58
i'm trying to convert a pre-trained frozen .pb based on Inception ResNet i got from David Sandbergs Github with the Tensorflow Lite Converter on Ubuntu using the following command: /home/nils/.local/bin/tflite_convert --output_file=/home/nils/Documents/frozen.tflite --graph_def_file=/home/nils/Documents/20180402-114759/20180402-114759.pb --input_arrays=input --output_arrays=embeddings --input_shapes=1,160,160,3 However, i get the following error: 2018-12-03 15:03:16.807431: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not