tensorflow-lite

RuntimeError: Encountered unresolved custom op: Normalize.Node number 0 (Normalize) failed to prepare

喜你入骨 提交于 2020-08-26 07:19:27
问题 I'm trying to implement smart reply https://www.tensorflow.org/lite/models/smart_reply/overview concept in Python. You can download tflite model file here https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip. import numpy as np import tensorflow as tf interpreter = tf.lite.Interpreter(model_path="smartreply.tflite") interpreter.allocate_tensors() While using above code, i'm getting this error, Traceback (most recent call last): File "smart_reply

Converting Bitmap to ByteBuffer (float) in Tensorflow-lite Android

人走茶凉 提交于 2020-08-07 10:34:25
问题 In tensorflow-lite android demo code for image classification, the images are first converted to ByteBuffer format for better performance.This conversion from bitmap to floating point format and the subsequent conversion to byte buffer seems to be an expensive operation(loops, bitwise operators, float mem-copy etc).We were trying to implement the same logic with opencv to gain some speed advantage.The following code works without error; but due to some logical error in this conversion, the

Sparkfun Edge bootloader problems

浪子不回头ぞ 提交于 2020-08-07 01:27:51
问题 Finally the sparkfun board edge boards arrived today ;-) Following this well written guide : https://codelabs.developers.google.com/codelabs/sparkfun-tensorflow/#3 i am stuck with the following NoResponseError when trying to flash the code on the Ambiq, with the uart_wired_update.py script, that comes with tensorflow examples opprud$ python3 tensorflow/lite/experimental/micro/tools/make/downloads/AmbiqSuite-Rel2.0.0/tools/apollo3_scripts/uart_wired_update.py -b 115200 /dev/cu.usbserial-1430

ValueError: Expect x to be a non-empty array or dataset (Tensor Flow lite model maker on Collab)

半腔热情 提交于 2020-08-06 05:03:13
问题 I am following this tutorial on creating a custom Model using TensorFlow lite Model Maker on Collab. import pathlib path = pathlib.Path('/content/employee_pics') count = len(list(path.glob('*/*.jpg'))) count data = ImageClassifierDataLoader.from_folder(path) train_data, test_data = data.split(0.5) I have an issue with step 2: model = image_classifier.create(train_data) I get an error: ValueError: Expect x to be a non-empty array or dataset. Am I doing something wrong? The data set provided in

java.lang.IllegalArgumentException: Cannot copy between a TensorFlowLite tensor with shape [2] and a Java object with shape [1, 2]

梦想与她 提交于 2020-07-23 06:30:10
问题 I've trained my own model for image classification model in keras and i converted it into tflite then i want to use that model in android through tensorflow lite. for this i used a github project to get my hands directly on the app link to the project is here: https://github.com/amitshekhariitbhu/Android-TensorFlow-Lite-Example/tree/master/app/src/main/java/com/amitshekhar/tflite But i have got this error in the logcat: 2020-03-30 14:50:48.747 27421-27421/com.amitshekhar.tflite E

java.lang.IllegalArgumentException: Cannot copy between a TensorFlowLite tensor with shape [2] and a Java object with shape [1, 2]

风流意气都作罢 提交于 2020-07-23 06:29:31
问题 I've trained my own model for image classification model in keras and i converted it into tflite then i want to use that model in android through tensorflow lite. for this i used a github project to get my hands directly on the app link to the project is here: https://github.com/amitshekhariitbhu/Android-TensorFlow-Lite-Example/tree/master/app/src/main/java/com/amitshekhar/tflite But i have got this error in the logcat: 2020-03-30 14:50:48.747 27421-27421/com.amitshekhar.tflite E