Tensorflow lite for other things thant gesture

Posted on
  • Hello,

    is it possible to use tensorflow with other event source than IMU ?

  • Yes, absolutely. There's an example here using Tensorflow's example code: https://github.com/espruino/Espruino/tree/master/libs/tensorflow#actually-using-it

    The Tensorflow core doesn't really care - you just load a model, put in data, run it, and then pull the data out the other side

  • Ah yes incoming data is done by

    tf.getInput()[0] = x;

  • Hi ,
    I have created my custom gesture recognition model and converted to tflite model but my input to model is a array of 4D how can we actually convert input stream into the format

    tf.getInput()[0] = x;
    
  • @user122861, how did you convert to tflite ?
    I tried some time ago to convert from keras to tflite see Forum entry
    But the result could not be used for bangle. Size was too big.

  • I followed the https://github.com/espruino/Espruino/tre­e/master/libs/tensorflow#actually-using-­it and it created a tflite model, my model has less 1024 parameters.
    However i get an error

    
    Uncaught 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

  • my input to model is a array of 4D

    You just need to flatten than into a 1D array, then write the array to tf.getInput() (which is just a 1D array).

    Didn't find op for builtin opcode 'ADD' version '1'

    Did you use that exact code, or did you modify it at all? The idea of tflite is you only include a subset of the available ops. In Bangle.js I tried to include every op that every tflite for microcontrollers example used, but that means that some of the more general ones won't be there.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Tensorflow lite for other things thant gesture

Posted by Avatar for FranckR @FranckR

Actions