Closed risb21 closed 9 months ago
I would also like to note that I've tried to run the hello world example on my RPi Pico W too (with relevant modifications for the LED pin choice) and the output of the model stayed the same, i.e. the LED did not pulsate and the model just gave the same output every iteration.
UPDATE: I managed to get it working by converting the model I had trained to an int8 quantized model, but I still would like to know if there is a way to run the un-quantized float32 model on the pico. I went through tensorflow lite documentation and it mentioned that fully quantized models are used for microcontrollers, but did not exclude the un-quantized models from running on microcontrollers.
I would also like to note that I've tried to run the hello world example on my RPi Pico W too (with relevant modifications for the LED pin choice) and the output of the model stayed the same, i.e. the LED did not pulsate and the model just gave the same output every iteration.
I also managed to get this running by using the int8 quantized model included in the hello_world
directory instead
I've been trying to get an output from the sequential model that I'm running on a Raspberry Pi Pico W, but the output is always the same.
it is best to checkout the code in the repository I'm currently working on, https://github.com/risb21/pico-shape-detection/tree/main
Here I've defined a method to predict values, calling
Invoke()
on the micro interpreter and then passing an output tensor data pointer. https://github.com/risb21/pico-shape-detection/blob/c50be45e462dbe6fd0bb65b4ae5ed76494c5db7a/src/tflite_wrapper.cpp#L94-L108But when I read from it, the data stays the same, even though the input accelerometer data is different every time. https://github.com/risb21/pico-shape-detection/blob/c50be45e462dbe6fd0bb65b4ae5ed76494c5db7a/src/main.cpp#L209-L235
The tflite model has 83 X 3 input nodes and 3 output nodes: