-
Hi @Gordon thanks for the reply
so you mean my model input should be always a flat 1D array and then internal conversion should be made while creating model. Currently the my input_array is 4D array so can i directly input this to the model or should i recreate my model to take only 1D array inputs. -
I have a tflite model which expects the input to be in int8 datatype
var tf = require("tensorflow").create(2048, model); tf.getInput()[0] = input_array; tf.invoke(); print(tf.getOutput()[0]);
I have loaded my data in the same shape as my model expects but when i print (tf.getInput()[0] ) it always shows zero even when input_array has values. I have encoded my model with base64. Can anyone help me out @Gordon please help me out here
Also tflite has standard get_tensor and set_tensor functions in interpreter to set the input data in proper format. I cannot see those functions in banglejs after loading the tflite model.
-
I followed the https://github.com/espruino/Espruino/tree/master/libs/tensorflow#actually-using-it and it created a tflite model, my model has less 1024 parameters.
However i get an errorUncaught Error: Didn't find op for builtin opcode 'ADD' version '1'
I used tensorflow 2.0 to create model
@Gordon can you please suggest way forward
-
This is my code and my model takes input as array i am always getting the same output when printed. I am pretty sure there is no problem in model as i loaded the tflite model and tested the output in my desktop and it is working fine.