You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
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.
Hi -
tf.getInput()
actually gives you a 1D array, so what you'd be doing withtf.getInput()[0] = input_array
is casting input_array to a single integer and writing it to the first element.Probably what you want is just:
tf.getInput().set(input_array)
They don't exist in Espruino - you just get
tf.getInput/Output
that do the formatting for you. Right now there's no support for multiple tensors of different types - you just get access to the first input and output one