Git Product home page Git Product logo

eloquenttinyml's Introduction

EloquentArduino library

This library contains source code and examples from the eloquentarduino blog, covering very different topics:

  • data structures
  • image / camera processing
  • print utilities
  • ...other miscellaneous

You can install this library either by cloning the repo or directly from the Arduino IDE Library Manager.

If you're interested in TinyML, I suggest you check out the EloquentTinyML library.

eloquenttinyml's People

Contributors

agrimagsrl avatar eloquentarduino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eloquenttinyml's Issues

Example not working out of the box

I tried to run the SineExample an got the following two errors while compiling:

error: no matching function for call to 'Eloquent::TinyML::TfLite<1u, 1u, 2048u>::TfLite()'
 Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml;
error: 'class Eloquent::TinyML::TfLite<1u, 1u, 2048u>' has no member named 'begin'
     ml.begin(sine_model);

Changing from:
Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml;
to

Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml((unsigned char*)sine_model);

and removing the line
ml.begin(sine_model);
during in setup() makes the code run.

Not able print to serial monitor

Hello!

I am trying deploy my own code to Arduino Nano 33 BLE Sense. The sine_model example code from readme compiles and runs on the device, successfully printing to the serial monitor.

My own code is as follows:

#include <EloquentTinyML.h>
#include <eloquent_tinyml/tensorflow.h>

#include "CNN_11_gen_clf_conv2d.h"

#define N_INPUTS 1522
#define N_OUTPUTS 10
// in future projects you may need to tweak this value: it's a trial and error process
#define TENSOR_ARENA_SIZE 20*1024

Eloquent::TinyML::TensorFlow::TensorFlow<N_INPUTS, N_OUTPUTS, TENSOR_ARENA_SIZE> tf;


void setup() {
    Serial.begin(115200);
    delay(4000);
    tf.begin(CNN_11_gen_clf_conv2d_tflite);
  
    // check if model loaded fine
    if (!tf.isOk()) {
        Serial.print("ERROR: ");
        Serial.println(tf.getErrorMessage());
        
        while (true) delay(1000);
    }
}

void loop() {
    for (float i = 0; i < 10; i++) {
        // pick x from 0 to PI
        float x = 3.14 * i / 10;
        float y = sin(x);
        //float input[1] = { x };
        //float predicted = tf.predict(input);
        
        Serial.print("sin(");
        Serial.print(x);
        Serial.print(") = ");
        Serial.print(y);
        Serial.print("\t predicted: ");
        //Serial.println(predicted);
    }

    delay(5000);
}

So basically the code is the same as in the example, except that I have changed the model to my own, changed the parameters and commented out some parts of the loop. Just trying to print out the x and y.

The code compiles and I am able to deploy it, but nothing comes out in the serial monitor.

What could be the reason? My model is full-integer quantized.

Issues with DigitsModel example

The get_model method in digits_model.py does not return what it is supposed to (returns Exp as opposed to returning model, x_test, and y_test). Furthermore, even after modifying the script like shown below, the generated model header file doesn't seem to work on any microcontrollers (after replacing the old digits_model.h with the new one generated by the script)

import numpy as np
import tensorflow as tf
from tinymlgen import port
from tensorflow.keras import layers
from sklearn.datasets import load_digits


def get_data():
    np.random.seed(1337)
    x_values, y_values = load_digits(return_X_y=True)
    x_values /= x_values.max()
    # reshape to (8 x 8 x 1)
    x_values = x_values.reshape((len(x_values), 8, 8, 1))

    # split into train, validation, test
    TRAIN_SPLIT = int(0.6 * len(x_values))
    TEST_SPLIT = int(0.2 * len(x_values) + TRAIN_SPLIT)
    x_train, x_test, x_validate = np.split(x_values, [TRAIN_SPLIT, TEST_SPLIT])
    y_train, y_test, y_validate = np.split(y_values, [TRAIN_SPLIT, TEST_SPLIT])

    return x_train, x_test, x_validate, y_train, y_test, y_validate


def get_model():
    x_train, x_test, x_validate, y_train, y_test, y_validate = get_data()
    # create a CNN
    model = tf.keras.Sequential()
    model.add(layers.Conv2D(8, (3, 3), activation='relu', input_shape=(8, 8, 1)))
    # model.add(layers.MaxPooling2D((2, 2)))
    # model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    # model.add(layers.MaxPooling2D((2, 2)))
    # model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    model.add(layers.Flatten())
    # model.add(layers.Dense(16, activation='relu'))
    model.add(layers.Dense(len(np.unique(y_train))))
    model.compile(optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), metrics=['accuracy'])
    model.fit(x_train, y_train, epochs=50, batch_size=16, validation_data=(x_validate, y_validate))
    return model, x_test, y_test


if __name__ == '__main__':
    model, x_test, y_test = get_model()
    open('selfdigits.h', 'w').write(port(model, variable_name='digits_model', pretty_print=True))

What am I doing wrong?

Edit: For some reason the current code in the repository also exits after test_model
Edit: Should have bee fixed when #13 was merged but it appears to still be an issue.

Compilation issues

The DigitsExample.ino doesn't compile as it shows the following error for the Arduino Nano 33 BLE board.

error

Also, if I try compiling it for the Arduino Uno board, then I get errors as it's not able to recognize my libraries like cstarg, cdtint, etc...!

Please let me know how can resolve the issue for either or both the cases!

TinyML for arduino Uno

Hi!

I was going through this wonderful post of yours https://eloquentarduino.github.io/2021/03/tinyml-classification-example-wine-dataset/ .

I was trying to understand and replicate the part where you convert the code to C++ and run the neural network on the microcontroller. I tried doing that process with the wine dataset as in your blog and also just tried running the EloquentTinyMl examples on my Arduino Uno. But I am repeatedly getting this same error.

image

image

I am unable to figure out where I am going wrong and how to go about it. Any help on this issue is very much appreciated :).

Thank you for your wonderful articles on TinyMl once again!!

error message when using Max Pool 2D

Hello,
Thank you fir your library.
I have used your library to try to have an esp32 recognize handwriten digits (mnist 8x8), but I had an error message ""Didn't find op for builtin opcode 'MaxPool2D' version '2'". After some research, I was able to find the problem, I had to modify line 25 in all_ops_resolver.cpp

before
AddBuiltin(BuiltinOperator_MAX_POOL_2D, Register_MAX_POOL_2D();
after
AddBuiltin(BuiltinOperator_MAX_POOL_2D, Register_MAX_POOL_2D(), 1 , 2);

and now it works, no more error message , and the esp32 is able to recognize handwriten digits.
Best Regards.

Issue on compiling Examples>2.4>SineExample on Arduino Nano 33 BLE Sense board

Arduino version: 1.8.19
Arduino nano 33 BLE board version: 2.6.1


Invalid library found in /home/sanjeev/Arduino/libraries/arm_math: no headers files (.h) found in /home/sanjeev/Arduino/libraries/arm_math
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/svdf.cpp:21:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/svdf.cpp:21:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/svdf.cpp:21:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/fully_connected.cpp:19:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/fully_connected.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/fully_connected.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/depthwise_conv.cpp:19:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/depthwise_conv.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/depthwise_conv.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/mul.cpp:19:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/mul.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/mul.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/pooling.cpp:18:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/pooling.cpp:18:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/pooling.cpp:18:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/conv.cpp:20:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/conv.cpp:20:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/conv.cpp:20:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/softmax.cpp:19:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/softmax.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/softmax.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/add.cpp:19:
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:44: error: 'uint32_t __SXTB16' redeclared as different kind of symbol
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                            ^
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:31: note: in expansion of macro '__SXTB16_RORn'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                               ^~~~~~~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_compiler.h:55:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math_types.h:77,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:202,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/add.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1981:31: note: previous declaration 'uint32_t __SXTB16(uint32_t)'
 __STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1)
                               ^~~~~~~~
In file included from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnsupportfunctions.h:34:0,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Include/arm_nnfunctions.h:165,
                 from /home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/kernels/cmsis-nn/add.cpp:19:
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:54: error: expected primary-expression before 'op1'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                      ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:50: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                  ^~~~
/home/sanjeev/.arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h:1989:68: error: expected primary-expression before 'rotate'
 __STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate)
                                                                    ^
/home/sanjeev/Arduino/libraries/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/DSP/Include/arm_math.h:199:56: note: in definition of macro '__SXTB16_RORn'
 #define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
                                                        ^~~~
exit status 1
Error compiling for board Arduino Nano 33 BLE.

print multiple outputs

Could you put an example in the README of how to deal with multiple outputs?

I have a model with 2 outputs (softmax) and changed the following lines in the code:

#define NUMBER_OF_OUTPUTS 2

float output[2] = {};
float predicted = ml.predict(input, output);

and
Serial.println(predicted[1]); as I want to get the second output.

I get the following error:

error: invalid types 'float[int]' for array subscript
     Serial.println(predicted[1]);
                               ^

Thanks!

'Eloquent' does not name a type

I install the library via: Arduino IDE > Tools > Manage Libraries
Board: ESP32 Dev Module

Error when compile:

SineExample:11:1: error: 'Eloquent' does not name a type
Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml;
^
C:\Users\ADMINI1\AppData\Local\Temp\arduino_modified_sketch_199840\SineExample.ino: In function 'void setup()':
SineExample:16:5: error: 'ml' was not declared in this scope
ml.begin(sine_model);
^
C:\Users\ADMINI
1\AppData\Local\Temp\arduino_modified_sketch_199840\SineExample.ino: In function 'void loop()':
SineExample:25:27: error: 'ml' was not declared in this scope
float predicted = ml.predict(input);
^
exit status 1
'Eloquent' does not name a type

Compiler errors for different arduino boards

I was trying to compile this for the Arduino MRK Zero board and got an error:

c:\users\owner\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\bits\stl_algobase.h:260:56: error: macro "max" passed 3 arguments, but takes just 2

     max(const _Tp& __a, const _Tp& __b, _Compare __comp)

A minor change to the code seems to sort it out. Via Stack Overflow.

#undef min
#undef max
#include <EloquentTinyML.h>

Seems to work though:

image

has no member named 'probaToClass'

I tried to run DigitsExample on ESP32 board, but I got below class error.
I installed EloquentTinyML 0.0.4 through library manager.

/home/zeta/Arduino/DigitsExample/DigitsExample.ino: In function 'void loop()':
DigitsExample:50:23: error: 'class Eloquent::TinyML::TfLite<64u, 10u, 8192u>' has no member named 'probaToClass'
     Serial.println(ml.probaToClass(y_pred));
                       ^
DigitsExample:52:23: error: 'class Eloquent::TinyML::TfLite<64u, 10u, 8192u>' has no member named 'predictClass'
     Serial.println(ml.predictClass(x_test));
                       ^
exit status 1

'class Eloquent::TinyML::TfLite<64u, 10u, 8192u>' has no member named 'probaToClass'

Screenshot_20201225_133221
Screenshot_20201225_133412

Problem in apply Conv2D on my own case when refer to your digits example.

Hi, recently I am doing an interesting project about using Conv2D or Dense to detect 2-classification-issues. I refer to your digits example.

I see in your digits example, you train the model using N*8*8*1 data. But in DigitsExample.ino, you input the 1*64 data to test. If it was in the Keras environment, the test input should also be 1*8*8*1. Does that mean in Arduino environment, the EloquentTinyML will regards all the input in one dimension structure as the 1*8*8*1 structure according to the .h network file, as you said here.

Next, it's my own project. Actually, my training data is N*1024. Next, I tested two different types of models. One is Conv2D and Dense, and other is fully Dense. I am sure I have made optimize=False as told here.

  1. Conv2D and Dense doesn't work

where the input is 1*32*32*1 and the output is 2-classification. I refer to your digits example, have the model in Keras like this:

model = tf.keras.Sequential()
model.add(layers.Conv2D(8, (3, 3), activation='relu', input_shape=(32, 32, 1)))
model.add(layers.Flatten()) 
#Flatten works in your digits example although Flatten seems to be unsupport by TFLite. 
#But anyway, I also have tried layers.Reshape() here, which should be supported by TFLite.
model.add(layers.Dense(2))

In Keras training, I reshape my training data into N*32*32*1. In the Arduino project, I reshape my data into 1*1024, which is similar to your 1*64 in digits. But the Predicted proba are 0.0 , 0.0, which is so weird.

  1. fully Dense works

where the input is 1*1024 and the output is 2-classification. The model is:

model = tf.keras.models.Sequential([
tf.keras.layers.Dense(10, activation=tf.nn.relu,input_shape=(1024,)),
tf.keras.layers.Dense(2)
])

In Keras training, I reshape my training data into N*1024. In the Arduino project, I also reshape my data into 1*1024, which is similar to your 1*64 in digits. It works normally. The Predicted proba are 0.90 , 0.10, which is ok.

Now I am stuck with this tricky problem. I guess the reason is the data structure problem. But perhaps there are another aspects I haven't considered. Do you have another advice for me?

Looking forward to your reply.

Best wishes

Debug support?

I'm trying to get a model working on the Arduino MKR board and I believe it's hanging in the constructor for Eloquent::TinyML::TfLite.

In my code it does not get passed "Initialising..."

image

TextClassifierExample.ino.txt
text_model.h.txt

Looking at the porting advice it mentions that it should be possible to have a debug logger.

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/README.md

There is some more advice on this in

https://github.com/eloquentarduino/EloquentTinyML/blob/master/src/tensorflow/lite/micro/debug_log.cpp

I tried adding this to mine but with no effect.

#include <arduino.h>
extern "C" void DebugLog(const char* s) { Serial.print(s); } // fprintf(stderr, "%s", s); 

library dont work with Flatten()

Hi.
I start your framework on esp32. If i run all full connected layers in my model, its work. But if i run cnn with flatten and full connected -> begin exception from esp from full connected layer tensorflow library

call esp32
Decoding stack results
0x4008eab4: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 155
0x4008ece5: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 170
0x400dfd85: tflite::reference_integer_ops::FullyConnected(tflite::FullyConnectedParams const&, tflite::RuntimeShape const&, signed char const*, tflite::RuntimeShape const&, signed char const*, tflite::RuntimeShape const&, int const*, tflite::RuntimeShape const&, signed char*) at C:\Users\ะะฝั‚ะพะฝ\Documents\Arduino\libraries\EloquentTinyML\src/tensorflow/lite/kernels/internal/reference/integer_ops/fully_connected.h line 62
0x400e0171: tflite::ops::micro::fully_connected::Eval(TfLiteContext*, TfLiteNode*) at C:\Users\ะะฝั‚ะพะฝ\Documents\Arduino\libraries\EloquentTinyML\src\tensorflow\lite\micro\kernels\fully_connected.cpp line 133
0x400e8e86: tflite::MicroInterpreter::MicroInterpreter(tflite::Model const*, tflite::OpResolver const&, unsigned char*, unsigned int, tflite::ErrorReporter*) at C:\Users\ะะฝั‚ะพะฝ\Documents\Arduino\libraries\EloquentTinyML\src\tensorflow\lite\micro\micro_interpreter.cpp line 60
0x400d1c90: neural(void*) at C:\Users\ะ ั’ะ ะ…ะกโ€šะ ั•ะ ะ…\Documents\Arduino\detect/detect.ino line 69
0x4008b115: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

Didn't find op for builtin opcode 'CONV_2D' version '5' Failed to get registration from op code d

@eloquentarduino I am trying to take an inference for a neural network on ESP 32 DEV KIT but it's throwing an error that is not understandable.

Please find my code below:

#include <EloquentTinyML.h>
#include <eloquent_tinyml/tensorflow.h>
#include "test_model.h"

#define NUMBER_OF_INPUTS 7200
#define NUMBER_OF_OUTPUTS 4
#define TENSOR_ARENA_SIZE 2*1024

Eloquent::TinyML::TensorFlow::TensorFlow<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml;

void setup() {
Serial.begin(115200);
ml.begin(test_model);
}

void loop() {
float x_test[7200] = {0.000000, 0.000139, ........ , 0.999722, 0.999861};
float y_pred[4] = {0, 0, 0, 0};

float predicted = ml.predict(x_test, y_pred);


Serial.print("\t predicted: ");
Serial.println(predicted);
delay(10000);

}

below is my model summary:

image

cannot allocate tensors with own generated model for Sine example

The output of the serial comms is.
image

What I've tried :
Increasing and decreasing Tensor arena size, still same error.

Haven't done much changes to the model generation other than outputting straight to a c file :

# Port to C
c_code = port(model, pretty_print = True)
c_file = open("sine_model.h", "w")
c_file.write(c_code)

Here are my files and the model that's being used.
Python script :

import math
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers
from tinymlgen import port

def get_model():
    SAMPLES = 1000
    np.random.seed(1337)
    x_values = np.random.uniform(low=0, high=2*math.pi, size=SAMPLES)
    # shuffle and add noise
    np.random.shuffle(x_values)
    y_values = np.sin(x_values)
    y_values += 0.1 * np.random.randn(*y_values.shape)

    # split into train, validation, test
    TRAIN_SPLIT =  int(0.6 * SAMPLES)
    TEST_SPLIT = int(0.2 * SAMPLES + TRAIN_SPLIT)
    x_train, x_test, x_validate = np.split(x_values, [TRAIN_SPLIT, TEST_SPLIT])
    y_train, y_test, y_validate = np.split(y_values, [TRAIN_SPLIT, TEST_SPLIT])

    # create a NN with 2 layers of 16 neurons
    model = tf.keras.Sequential()
    model.add(layers.Dense(8, activation='relu', input_shape=(1,)))
    model.add(layers.Dense(16, activation='relu'))
    model.add(layers.Dense(1))
    model.compile(optimizer='rmsprop', loss='mse', metrics=['mae'])
    model.fit(x_train, y_train, epochs=200, batch_size=16,
                        validation_data=(x_validate, y_validate))
    return model


def test_model(model, verbose=False):
    x_test = np.random.uniform(low=0, high=2*math.pi, size=100)
    y_test = np.sin(x_test)
    y_pred = model.predict(x_test)
    print('MAE', np.abs(y_pred - y_test).mean())

model = get_model()
converter = tf.lite.TFLiteConverter.from_keras_model(model)
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
tflite_model = converter.convert()
test_model(model)

# Save the model to disk
open("sine_model_quantized.tflite", "wb").write(tflite_model)

# Port to C
c_code = port(model, pretty_print = True)
c_file = open("sine_model.h", "w")
c_file.write(c_code)

Arduino IDE code :

#include <EloquentTinyML.h>
// sine_model.h contains the array you exported from the previous step
// with either xxd or tinymlgen
#include "sine_model.h"

#define NUMBER_OF_INPUTS 1
#define NUMBER_OF_OUTPUTS 1
// in future projects you may need to tweak this value.
// it's a trial and error process
#define TENSOR_ARENA_SIZE 2*1024

Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml;

void setup() {
    Serial.begin(115200);
    ml.begin(model_data);
}

void loop() {
    // pick up a random x and predict its sine
    float x = 3.14 * random(100) / 100;
    float y = sin(x);
    float input[1] = { x };
    float predicted = ml.predict(input);

    Serial.print("sin(");
    Serial.print(x);
    Serial.print(") = ");
    Serial.print(y);
    Serial.print("\t predicted: ");
    Serial.println(predicted);
    delay(1000);
}

sine_model.h

#ifdef __has_attribute
#define HAVE_ATTRIBUTE(x) __has_attribute(x)
#else
#define HAVE_ATTRIBUTE(x) 0
#endif
#if HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__))
#define DATA_ALIGN_ATTRIBUTE __attribute__((aligned(4)))
#else
#define DATA_ALIGN_ATTRIBUTE
#endif

const unsigned char model_data[] DATA_ALIGN_ATTRIBUTE = {
	0x20, 0x00, 0x00, 0x00, 0x54, 0x46, 0x4c, 0x33, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x12, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 
	0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x12, 0x00, 0x00, 0x00, 
	0x03, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 
	0x18, 0x04, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 
	0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
	0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x6d, 0x69, 0x6e, 0x5f, 
	0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 
	0x69, 0x6f, 0x6e, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc8, 0x03, 0x00, 0x00, 
	0xb4, 0x03, 0x00, 0x00, 0x78, 0x03, 0x00, 0x00, 0x14, 0x03, 0x00, 0x00, 
	0x00, 0x03, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 
	0x64, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 
	0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xb6, 0xfc, 0xff, 0xff, 
	0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x31, 0x2e, 0x35, 0x2e, 
	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0xc4, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0xd4, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0xf7, 0xff, 0xff, 
	0x00, 0x00, 0x00, 0x00, 0x06, 0xfd, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 
	0x40, 0x00, 0x00, 0x00, 0x34, 0xba, 0x9c, 0xbf, 0x9c, 0x6c, 0xb7, 0x3e, 
	0x75, 0xc7, 0x35, 0x3f, 0xcd, 0xc1, 0xe3, 0xbe, 0xe3, 0xef, 0x0e, 0xbf, 
	0x0f, 0x80, 0x37, 0xbf, 0x71, 0xdd, 0xfe, 0x3f, 0x4c, 0x88, 0x10, 0x3f, 
	0xaf, 0x8b, 0xed, 0xbd, 0xe4, 0xfb, 0xa5, 0x3e, 0x47, 0xf7, 0xbb, 0x3f, 
	0xe6, 0x8f, 0x0b, 0x3f, 0xff, 0x86, 0x6f, 0x3f, 0x4a, 0x8f, 0x33, 0xbe, 
	0xa0, 0xcf, 0x2c, 0xbf, 0xbf, 0x80, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 
	0x56, 0xfd, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 
	0xc3, 0x9d, 0xb8, 0x3e, 0x14, 0x5e, 0xc2, 0x3e, 0x20, 0xc4, 0x5b, 0xbd, 
	0x75, 0x98, 0x79, 0x3e, 0x68, 0x1c, 0xd2, 0xbe, 0x6e, 0xff, 0xac, 0xbf, 
	0x00, 0x95, 0xef, 0xbd, 0x78, 0x1d, 0x2a, 0x3e, 0x7e, 0xf0, 0x94, 0x3e, 
	0xec, 0x78, 0xad, 0x3e, 0x82, 0xf4, 0x8a, 0x3e, 0xd6, 0x1d, 0xe0, 0xbd, 
	0xc0, 0x86, 0x97, 0xbd, 0xf2, 0xda, 0x97, 0x3e, 0xcc, 0xe2, 0x87, 0x3e, 
	0x2c, 0xab, 0x91, 0x3e, 0xa9, 0xe0, 0x9d, 0xbd, 0xb8, 0x8e, 0x2b, 0xbe, 
	0x52, 0x13, 0xe2, 0xbe, 0x3f, 0x9d, 0xbc, 0xbe, 0x74, 0xf5, 0xb9, 0x3e, 
	0x4d, 0x3e, 0x78, 0x3e, 0x4c, 0xcc, 0xf5, 0xbe, 0x0c, 0x5a, 0xf7, 0xbe, 
	0xd0, 0xbb, 0x65, 0xbe, 0x04, 0xf4, 0x96, 0x3e, 0xb0, 0x6b, 0xbd, 0xbd, 
	0x38, 0xcb, 0xd1, 0x3e, 0x00, 0x18, 0x9e, 0xbe, 0xe0, 0x2e, 0x88, 0xbe, 
	0x90, 0x5e, 0xfa, 0x3d, 0x40, 0xa4, 0xd7, 0xbc, 0xd9, 0xba, 0x83, 0xbe, 
	0x74, 0xaa, 0xf1, 0x3e, 0xff, 0xdc, 0x01, 0x3f, 0xf2, 0xc7, 0xad, 0x3e, 
	0x00, 0xc8, 0xf7, 0x3a, 0x47, 0x53, 0xb9, 0x3e, 0x80, 0x16, 0x57, 0x3e, 
	0xa0, 0x63, 0x25, 0x3d, 0xeb, 0xd5, 0x83, 0xbe, 0x20, 0xad, 0xf0, 0xbd, 
	0x2c, 0x70, 0x84, 0x3d, 0x48, 0x36, 0x46, 0xbf, 0x78, 0xbb, 0x96, 0xbe, 
	0xe2, 0x11, 0x5a, 0x3e, 0x8c, 0xa3, 0xfc, 0xbe, 0x60, 0xca, 0x00, 0xbe, 
	0xa9, 0xbe, 0x39, 0xbe, 0x00, 0xc0, 0x36, 0xb9, 0x42, 0xb4, 0xe4, 0x3e, 
	0x5c, 0x8e, 0xe3, 0x3e, 0x80, 0x31, 0x3b, 0x3d, 0x3f, 0xf0, 0xb3, 0xbc, 
	0x5c, 0x82, 0xad, 0x3e, 0x80, 0x6f, 0xe5, 0x3c, 0x62, 0x28, 0xd4, 0x3d, 
	0xe0, 0xa6, 0xaa, 0xbd, 0x18, 0x22, 0x85, 0x3e, 0x90, 0x12, 0x14, 0xbe, 
	0x50, 0xb3, 0x82, 0x3d, 0x8b, 0x5e, 0xac, 0xbe, 0xa0, 0xe5, 0xe7, 0xbe, 
	0x08, 0x9e, 0xea, 0xbe, 0x5e, 0xa9, 0x43, 0xbe, 0x20, 0x6d, 0x5d, 0xbd, 
	0x61, 0xcb, 0xbb, 0xbe, 0x73, 0x68, 0xac, 0x3d, 0x38, 0xab, 0x9e, 0xbe, 
	0xe6, 0x72, 0x02, 0x3f, 0x18, 0xf3, 0xa1, 0xbe, 0x20, 0x45, 0x99, 0x3e, 
	0x30, 0x68, 0xfc, 0xbe, 0x28, 0x9c, 0xcc, 0x3e, 0x00, 0x42, 0x9b, 0x3c, 
	0x18, 0x58, 0x51, 0x3e, 0x78, 0x0e, 0xd1, 0x3e, 0xcc, 0x33, 0xc9, 0xbe, 
	0x30, 0x5b, 0x0d, 0xbe, 0x80, 0xb9, 0xe6, 0xbc, 0x7b, 0xa1, 0x0a, 0x3d, 
	0xe0, 0xfc, 0x8d, 0x3e, 0x0a, 0x11, 0x83, 0xbf, 0x80, 0x48, 0x63, 0xbf, 
	0x00, 0xef, 0x6e, 0x3e, 0xd8, 0xbf, 0xd1, 0x3e, 0x1c, 0x56, 0x97, 0xbe, 
	0xb8, 0xca, 0x5f, 0x3e, 0xb8, 0x3a, 0x27, 0xbe, 0x80, 0x81, 0x68, 0xbe, 
	0x40, 0xe1, 0x4e, 0xbd, 0x30, 0x35, 0xb9, 0xbd, 0x78, 0x98, 0xad, 0xbe, 
	0xe0, 0x94, 0xf0, 0xbe, 0x88, 0xe4, 0x6a, 0x3e, 0x28, 0xda, 0x12, 0xbe, 
	0x84, 0x4c, 0x65, 0x3c, 0x90, 0xa3, 0x8d, 0xbe, 0x28, 0x2e, 0xc8, 0xbe, 
	0x9a, 0x89, 0x2e, 0xbf, 0x9c, 0xee, 0x89, 0xbe, 0x89, 0x48, 0x33, 0x3e, 
	0x24, 0xff, 0xdc, 0xbe, 0x80, 0x37, 0x03, 0xbd, 0x6a, 0x74, 0x07, 0xbf, 
	0x24, 0x2d, 0xcb, 0xbe, 0xf3, 0x29, 0x1d, 0xbe, 0xa2, 0x1c, 0xc7, 0x3e, 
	0x78, 0x6a, 0xbc, 0x3e, 0xb4, 0x6e, 0x57, 0xbd, 0x40, 0x70, 0xd1, 0x3c, 
	0xf8, 0xc4, 0x3d, 0x3e, 0x26, 0xff, 0xe3, 0x3b, 0x60, 0xbb, 0xa7, 0x3d, 
	0x71, 0x3b, 0x32, 0xbe, 0xbb, 0x44, 0xd0, 0xbe, 0x60, 0x40, 0x91, 0x3e, 
	0xc4, 0xe7, 0x0c, 0x3f, 0xa8, 0x6c, 0x9c, 0x3e, 0xc0, 0xb4, 0x96, 0xbd, 
	0x7a, 0x97, 0x09, 0xbf, 0x18, 0xbf, 0x4c, 0xbe, 0x9e, 0xc6, 0xa8, 0x3e, 
	0x9d, 0x6a, 0x4b, 0x3f, 0x28, 0x4b, 0x93, 0x3e, 0xf0, 0xfb, 0x81, 0xbd, 
	0x68, 0xd6, 0x8f, 0xbe, 0xf0, 0x44, 0xc6, 0xbd, 0x00, 0x00, 0x00, 0x00, 
	0x66, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
	0xdd, 0x1d, 0x78, 0x3b, 0x44, 0x56, 0x92, 0xbe, 0x52, 0x12, 0x71, 0x3e, 
	0xc9, 0x98, 0x8c, 0x3e, 0xd6, 0x0e, 0x29, 0xbf, 0x17, 0xe1, 0xb4, 0x3e, 
	0xbc, 0x3f, 0x00, 0xbf, 0x59, 0x51, 0x07, 0xbf, 0x00, 0x00, 0x00, 0x00, 
	0x96, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x3b, 0xb2, 0x70, 0xbe, 0xa6, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 
	0x40, 0x00, 0x00, 0x00, 0x57, 0xa5, 0xe2, 0x3e, 0x2a, 0x95, 0x1b, 0xbe, 
	0x5f, 0x99, 0xfe, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x3d, 0xc2, 0x3c, 
	0x09, 0x8b, 0x1b, 0xbc, 0x19, 0x4a, 0xf9, 0xbe, 0x58, 0xb0, 0xdc, 0xbc, 
	0x6c, 0x7a, 0x36, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x97, 0x71, 0x98, 0x3e, 
	0x00, 0x00, 0x00, 0x00, 0x80, 0x47, 0xa6, 0x3e, 0xa5, 0x0b, 0x28, 0xbd, 
	0xdd, 0xb4, 0xbd, 0xbd, 0x45, 0x12, 0x0f, 0xbf, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 
	0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x20, 0x00, 0x00, 0x00, 0x3d, 0x89, 0xdf, 0x3e, 0x00, 0x00, 0x00, 0x00, 
	0x94, 0x8b, 0xd0, 0xbe, 0x0c, 0x62, 0x26, 0xbf, 0x00, 0x00, 0x00, 0x00, 
	0x18, 0xab, 0x83, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x24, 0xfb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x34, 0xfb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x4d, 0x4c, 0x49, 0x52, 
	0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x2e, 0x00, 
	0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 
	0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x14, 0x00, 
	0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 
	0xe8, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 
	0x03, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0xce, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x08, 
	0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0xb4, 0xfb, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 
	0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00, 
	0x08, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0xba, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 
	0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
	0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 
	0x07, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
	0x24, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 
	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 
	0x68, 0x03, 0x00, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x8c, 0x02, 0x00, 0x00, 
	0x30, 0x02, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00, 
	0x5c, 0x01, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0xd4, 0xfc, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 
	0x0a, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
	0x01, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 
	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 
	0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
	0x18, 0xfd, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 
	0x1c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00, 0x00, 
	0x04, 0xfd, 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x73, 0x65, 0x71, 0x75, 
	0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 0x73, 0x65, 
	0x5f, 0x31, 0x2f, 0x4d, 0x61, 0x74, 0x4d, 0x75, 0x6c, 0x3b, 0x73, 0x65, 
	0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 
	0x73, 0x65, 0x5f, 0x31, 0x2f, 0x52, 0x65, 0x6c, 0x75, 0x3b, 0x73, 0x65, 
	0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 
	0x73, 0x65, 0x5f, 0x31, 0x2f, 0x42, 0x69, 0x61, 0x73, 0x41, 0x64, 0x64, 
	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
	0x10, 0x00, 0x00, 0x00, 0xa0, 0xfd, 0xff, 0xff, 0x70, 0x00, 0x00, 0x00, 
	0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
	0x08, 0x00, 0x00, 0x00, 0x8c, 0xfd, 0xff, 0xff, 0x46, 0x00, 0x00, 0x00, 
	0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 
	0x65, 0x6e, 0x73, 0x65, 0x2f, 0x4d, 0x61, 0x74, 0x4d, 0x75, 0x6c, 0x3b, 
	0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 
	0x65, 0x6e, 0x73, 0x65, 0x2f, 0x52, 0x65, 0x6c, 0x75, 0x3b, 0x73, 0x65, 
	0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 
	0x73, 0x65, 0x2f, 0x42, 0x69, 0x61, 0x73, 0x41, 0x64, 0x64, 0x00, 0x00, 
	0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
	0x86, 0xfe, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
	0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xfc, 0xfd, 0xff, 0xff, 
	0x19, 0x00, 0x00, 0x00, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 
	0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x32, 0x2f, 0x4d, 
	0x61, 0x74, 0x4d, 0x75, 0x6c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
	0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xca, 0xfe, 0xff, 0xff, 
	0x34, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0x40, 0xfe, 0xff, 0xff, 0x19, 0x00, 0x00, 0x00, 
	0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 
	0x65, 0x6e, 0x73, 0x65, 0x5f, 0x31, 0x2f, 0x4d, 0x61, 0x74, 0x4d, 0x75, 
	0x6c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
	0x08, 0x00, 0x00, 0x00, 0x0e, 0xff, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00, 
	0x05, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
	0x84, 0xfe, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x73, 0x65, 0x71, 0x75, 
	0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 0x73, 0x65, 
	0x2f, 0x4d, 0x61, 0x74, 0x4d, 0x75, 0x6c, 0x00, 0x02, 0x00, 0x00, 0x00, 
	0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xff, 0xff, 
	0x4c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0xc4, 0xfe, 0xff, 0xff, 0x32, 0x00, 0x00, 0x00, 
	0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 
	0x65, 0x6e, 0x73, 0x65, 0x5f, 0x32, 0x2f, 0x42, 0x69, 0x61, 0x73, 0x41, 
	0x64, 0x64, 0x2f, 0x52, 0x65, 0x61, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 
	0x62, 0x6c, 0x65, 0x4f, 0x70, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 
	0x63, 0x65, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
	0xa6, 0xff, 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
	0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0xff, 0xff, 0xff, 
	0x32, 0x00, 0x00, 0x00, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 
	0x61, 0x6c, 0x2f, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x31, 0x2f, 0x42, 
	0x69, 0x61, 0x73, 0x41, 0x64, 0x64, 0x2f, 0x52, 0x65, 0x61, 0x64, 0x56, 
	0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x2f, 0x72, 0x65, 
	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
	0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x04, 0x00, 
	0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 
	0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0x84, 0xff, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00, 
	0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x64, 
	0x65, 0x6e, 0x73, 0x65, 0x2f, 0x42, 0x69, 0x61, 0x73, 0x41, 0x64, 0x64, 
	0x2f, 0x52, 0x65, 0x61, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 
	0x65, 0x4f, 0x70, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 
	0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
	0x14, 0x00, 0x18, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 
	0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 
	0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
	0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
	0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 
	0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x64, 0x65, 0x6e, 0x73, 
	0x65, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x00, 0x02, 0x00, 0x00, 0x00, 
	0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
	0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 
	0x08, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 
	0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00
};
const int model_data_len = 2384;

Error compiling for ESP32-DEV-Module

Hi๏ผŒThe following error is reported at compile time๏ผš

c:\Users\HP\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\arm\tensorflow\lite\micro\tools\make\downloads\cmsis\CMSIS\NN\Source\ConvolutionFunctions\arm_convolve_1x1_HWC_q7_fast_nonsquare.c:1:0: fatal error: opening dependency file C:\Users\HP\AppData\Local\Temp\arduino-sketch-4FBA319415F0427AB022FB1B916D6EC9\libraries\EloquentTinyML\eloquent_tinyml\tensorflow\arm\tensorflow\lite\micro\tools\make\downloads\cmsis\CMSIS\NN\Source\ConvolutionFunctions\arm_convolve_1x1_HWC_q7_fast_nonsquare.c.d: No such file or directory
#if !defined(ESP32)
^compilation terminated.
Compilation error: Error: 13 INTERNAL: exit status 1

help me please
thanks

Error compiling for board DOIT ESP32 DEVKIT V1

error: insn does not satisfy its constraints:
}
^
(insn 45 1406 1640 111 (set (reg:SF 19 f0 [orig:198 _248 ] [198])
(mem/u/c:SF (symbol_ref/u:SI ("*.LC101") [flags 0x2]) [0 S4 A32])) "c:\Users\raghu\Documents\Arduino\libraries\EloquentTinyML-master\src/tensorflow/lite/micro/kernels/activation_utils.h":44 47 {movsf_internal}
(expr_list:REG_EQUAL (const_double:SF 6.0e+0 [0x0.cp+3])
(nil)))
during RTL pass: postreload

Problem with multiple outputs

Thanks for the great Repo!
I am trying to use the but fot multiple inputs (3) and outputs(2),
However, the output always colleted the same value for both outputs.
Example:
I changed the inputs, and for each new input sets, the pair of outputs is different from the previous one, but the pair is equal:

float input[3] = { 10, 20, 30 };
float output[2] = { 0 };

ml.predict(input, output);

Serial Console Printed:
x: 1.92 y: 1.92

float input[3] = { 20, 10, 30 };
float output[2] = { 0 };

ml.predict(input, output);

Serial Console Printed:
x: 1.30 y: 1.30

PS.: This issue do not occured with the model in the Keras notebook.

Notebook Environment: Google Colab
Microcontroller: ESP32 - ESP-WROOM-32

Follow my code:
https://github.com/alefelipeoliveira/EloquentTinyML_TEST

NameError: name 'Exp' is not defined

NameError Traceback (most recent call last)
in ()
1 if name == 'main':
----> 2 model, x_test, y_test = get_model()
3 test_model(model, x_test, y_test)
4 c_code = port(model, variable_name='digits_model', pretty_print=True)
5 print(c_code)

in get_model()
16 model.fit(x_train, y_train, epochs=50, batch_size=16,
17 validation_data=(x_validate, y_validate))
---> 18 return Exp
NameError: name 'Exp' is not defined

Should I change 'return Exp' to 'reture model, x_test, y_test'

Thank you!!

Multiple output

Hey, I think you did mistake in multiple output code
image
Change data.f[0] to data.f[i]

Three spaces too much

Thanks for this library. Worked immediately!

Small improvement suggestion for an error message on line 418 in micro_allocator.cpp link

The printed string currently looks like this

"Failed to get registration from op code % d\n "

The space between % and d should go, but probably also the one after \n and the one between op and code:

"Failed to get registration from opcode %d\n"

Google Colab issue

it always gives NaN when I use google colab to generate the C array

Exact same code of python, exact Arduino code. just my C array is different from yours. I dont know why it gives me different array when using google colab.

update to recent tensorflow version

I see that EloquentTinyML lib use a old version of Tensorflow lite. Is there some plan to upgrade to a new version?
Maybe a tutorial about upgrade.
Anyway this a great job. Thank you
Marco

Conv1D & MaxPooling1D

After I successfully using Kaggle to generate TinyML MNIST and running its Arduino TinyML_MNIST sample code on ESP32
I create another example which is TinyML ECG,
it uses Conv1D & MaxPooling1D for ECG heartbeat classification, input_shape=(187, 1)
however, it failed to predict using its Arduino TinyML_ECG sample code on ESP32 (NodeMCU32S)

I tried different TENSOR_ARENA_SIZE , 32/64 *1024, still not able to get prediction result,
the below message seems not running the model with x_test.h, y_pred are all 0.00 (this ECG num_classes = 5)

It took 3 micros to run inference
0.00,0.00,0.00,0.00,0.00
Predicted Class :0
Sanity check:0

Any hint to debug this ?

...arm_convolve_1x1_HWC_q7_fast_nonsquare.c.d: No such file or directory

Using ESP-32 Feather Board in Vscode with PlatformIO.
Full Error:
lib/EloquentTinyML/src/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_1x1_HWC_q7_fast_nonsquare.c:1: fatal error: opening dependency file .pio/build/featheresp32/lib93d/EloquentTinyML/eloquent_tinyml/tensorflow/arm/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_1x1_HWC_q7_fast_nonsquare.c.d: No such file or directory

It seems that PlatformIO isn't finding/making a "arm_convolve_1x1_HWC_q7_fast_nonsquare.c.d" file within .pio. Although when checking the EloquentTinyML library an "arm_convolve_1x1_HWC_q7_fast_nonsquare.c" does seem to exist where it should, i'm not sure if these are related.

I am using the latest version, v2.4.0, although I manually added this library instead of via PlatformIO as it seems to only have v0.02 and v0.03 available.

I have been unable to make this library work with either Vscode or Arduino IDE (with Arduino IDE, a similar "No Such File or Directory" Error occurs, although this time for "C:\Users[Name]\Documents\Arduino\libraries\EloquentTinyML\ src/eloquent_tinyml/tensorflow/arm/third_party/flatbuffers/include/flatbuffers/base.h:32:10: fatal error: cstddef: No such file or directory"

Is there any advice to resolve these errors? Making recognition systems play nice with microcontrollers has been a brick wall.

When warning level raised, compilation breaks.

If you set (in the Arduino IDE)

  File > Preferences > Compiler warnings > More

then close and reopen Arduino IDE (otherwise the build is from the cache)
you get more warnings (on All even more).

    C:\Users\mpen\Documents\Arduino\libraries\EloquentTinyML\src\tensorflow\lite\micro\debug_log_numbers.cpp: In function 'char* {anonymous}::FastFloatToBufferLeft(float, char*)':
    C:\Users\mpen\Documents\Arduino\libraries\EloquentTinyML\src\tensorflow\lite\micro\debug_log_numbers.cpp:117:53: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       const uint32_t u = *reinterpret_cast<uint32_t*>(&f);
                                                         ^
    In file included from C:\Users\mpen\Documents\Arduino\libraries\EloquentTinyML\src\tensorflow\lite\micro\kernels\svdf.cpp:25:0:
    C:\Users\mpen\Documents\Arduino\libraries\EloquentTinyML\src/tensorflow/lite/micro/kernels/activation_utils.h: In function 'float tflite::ops::micro::ActivationValFloat(TfLiteFusedActivation, float)':
    C:\Users\mpen\Documents\Arduino\libraries\EloquentTinyML\src/tensorflow/lite/micro/kernels/activation_utils.h:53:1: error: control reaches end of non-void function [-Werror=return-type]
     }
     ^
    cc1plus.exe: some warnings being treated as errors
    exit status 1
    Error compiling for board AI Thinker ESP32-CAM.

The problem is that (I believe the last) warning results in a failed compilation because a return is missing in the below function. Probably because a default case is missing in the switch.

// Returns the floating point value for a fused activation:
inline float ActivationValFloat(TfLiteFusedActivation act, float a) {
  switch (act) {
    case kTfLiteActNone:
      return a;
    case kTfLiteActRelu:
      return _max(0.0f, a);
    case kTfLiteActRelu1:
      return _max(-1.0f, _min(a, 1.0f));
    case kTfLiteActRelu6:
      return _max(0.0f, _min(a, 6.0f));
    case kTfLiteActTanh:
      return tanh(a);
    case kTfLiteActSignBit:
      //return signbit(a);
	  return a > 0 ? 1 : 0;
    case kTfLiteActSigmoid:
      return 1.0f / (1.0f + exp(-a));
  }
}

Fail: "cannot move location counter backwards"

Hello Simone,
I used your script to create TinyML models, which should recognize 96x96 grayscale images. In Python everything worked as well, model was created. Only compiling for Nano33 BLE in Arduino does not work. It breaks with the error message "linker_script.ld:138 cannot move location counter backwards (from 20fd4a70 to 2003fc00)".
Could you maybe help me further? I get the same error message when I try to compile the exported model from Teachable Machine to Nano 33 BLE.

Error while begining model

Hi. I'm a next to noob regarding ML stuff, but I am needed to deploy a model on ESP32.
The model I am given is a tflite file, converted to C array. Arena size is set according to arena estimator sizes. During the tf.begin() call, the serial prints are as such:

Didn't find op for builtin opcode 'MUL' version '1'
Failed to get registration from op code d
--->TF ERROR: Cannot allocate tensors

From what i understand, the model has a mul (multiply) layer (it is the 1st one) that the esp32 code cannot find the equivalent op code. Thing is, the mul operation is supported by TFlite (the same is for all the rest of the layers of the model), so why is it that it cannot be found?

I can provide said model and device code if needed. Also, if this is more of a TFlite problem than an EloquentTinyML one, let me know to go ask elsewhere! :)

warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] when compiling

Hi dev,

I'm trying to use TinyML fo my project. And when I compile my code , it gives me error :

D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_allocator.cpp:101:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (buffer == nullptr || input_index < 0 ||
~~~~~~~~~^~~
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_allocator.cpp: In member function 'TfLiteStatus tflite::MicroAllocator::AllocateNodeAndRegistrations(const tflite::OpResolver&, tflite::NodeAndRegistration**)':
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_allocator.cpp:137:15: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (index < 0 || index >= opcodes->size()) {
~~~~~~^~~
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_allocator.cpp: In member function 'TfLiteStatus tflite::MicroAllocator::InitializeRuntimeTensor(const tflite::Tensor&, const flatbuffers::Vector<flatbuffers::Offset<tflite::Buffer> >*, tflite::ErrorReporter*, TfLiteTensor*, uint8_t*)':
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_allocator.cpp:400:18: error: unused variable 'array_size' [-Werror=unused-variable]
if (size_t array_size = array->size()) {
^~~~~~~~~~
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_interpreter.cpp: In member function 'TfLiteTensor* tflite::MicroInterpreter::input(size_t)':
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_interpreter.cpp:231:14: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if ((index < 0) || (index >= length)) {
~~~~~~^~~
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_interpreter.cpp: In member function 'TfLiteTensor* tflite::MicroInterpreter::output(size_t)':
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_interpreter.cpp:242:14: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if ((index < 0) || (index >= outputs->size())) {
~~~~~~^~~
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_interpreter.cpp: In member function 'TfLiteTensor* tflite::MicroInterpreter::tensor(size_t)':
D:\USERDATA\Documents\Arduino\libraries\EloquentTinyML\src\eloquent_tinyml\tensorflow\esp32\tensorflow\lite\experimental\micro\micro_interpreter.cpp:252:14: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if ((index < 0) || (index >= tensors_size())) {
~~~~~~^~~

My environment is
OS : Windows 10 10.0.19044.2130 (21H2)
ArduinoIDE v1.8.19
Board ESP32-DEVKIT-V1
TinyML 2.4.4

It may sound weird because the current tag here is 2.4.0, but I found that 2.4.4 is latest version at my Library Manager.

Thank you

dumb

no doc so stupid

'Didn't find op for builtin opcode ...' error

Hi! I'm trying to upload a TFLite model that uses autoencoder with tanh activation function in the layers but I get the following errors when uploading

Start
GetModel done
Version check done
Didn't find op for builtin opcode 'TANH' version '1'

Failed to get registration from op code  d
 
Allocation failed
AllocateTensors() failed

Is there any special configuration that I should do or tanh is not supported yet?

NameError: name 'Exp' is not defined, digits_model.py

zeta@changwhan-asus:~/Arduino/DigitsExample$ python3 digits_model.py
2020-12-25 11:20:39.928140: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-12-25 11:20:39.948926: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2099940000 Hz
2020-12-25 11:20:39.949262: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56281223f3f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-12-25 11:20:39.949294: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
Epoch 1/50
68/68 [==============================] - 0s 2ms/step - loss: 2.0999 - accuracy: 0.4814 - val_loss: 1.7846 - val_accuracy: 0.7944
Epoch 2/50
68/68 [==============================] - 0s 970us/step - loss: 1.3560 - accuracy: 0.8516 - val_loss: 1.0277 - val_accuracy: 0.8194
Epoch 3/50
68/68 [==============================] - 0s 934us/step - loss: 0.6727 - accuracy: 0.9045 - val_loss: 0.6596 - val_accuracy: 0.8500
Epoch 4/50
68/68 [==============================] - 0s 948us/step - loss: 0.3958 - accuracy: 0.9314 - val_loss: 0.5517 - val_accuracy: 0.8528
Epoch 5/50
68/68 [==============================] - 0s 956us/step - loss: 0.2817 - accuracy: 0.9462 - val_loss: 0.4983 - val_accuracy: 0.8556
Epoch 6/50
68/68 [==============================] - 0s 954us/step - loss: 0.2200 - accuracy: 0.9536 - val_loss: 0.4707 - val_accuracy: 0.8611
Epoch 7/50
68/68 [==============================] - 0s 950us/step - loss: 0.1884 - accuracy: 0.9573 - val_loss: 0.4583 - val_accuracy: 0.8556
Epoch 8/50
68/68 [==============================] - 0s 947us/step - loss: 0.1621 - accuracy: 0.9601 - val_loss: 0.4408 - val_accuracy: 0.8722
Epoch 9/50
68/68 [==============================] - 0s 953us/step - loss: 0.1392 - accuracy: 0.9657 - val_loss: 0.4489 - val_accuracy: 0.8694
Epoch 10/50
68/68 [==============================] - 0s 948us/step - loss: 0.1262 - accuracy: 0.9712 - val_loss: 0.4396 - val_accuracy: 0.8778
Epoch 11/50
68/68 [==============================] - 0s 952us/step - loss: 0.1164 - accuracy: 0.9712 - val_loss: 0.4338 - val_accuracy: 0.8750
Epoch 12/50
68/68 [==============================] - 0s 944us/step - loss: 0.1056 - accuracy: 0.9722 - val_loss: 0.4306 - val_accuracy: 0.8833
Epoch 13/50
68/68 [==============================] - 0s 945us/step - loss: 0.1004 - accuracy: 0.9750 - val_loss: 0.4332 - val_accuracy: 0.8861
Epoch 14/50
68/68 [==============================] - 0s 944us/step - loss: 0.0922 - accuracy: 0.9796 - val_loss: 0.4203 - val_accuracy: 0.8806
Epoch 15/50
68/68 [==============================] - 0s 941us/step - loss: 0.0855 - accuracy: 0.9814 - val_loss: 0.4213 - val_accuracy: 0.8806
Epoch 16/50
68/68 [==============================] - 0s 941us/step - loss: 0.0793 - accuracy: 0.9833 - val_loss: 0.4277 - val_accuracy: 0.8917
Epoch 17/50
68/68 [==============================] - 0s 948us/step - loss: 0.0748 - accuracy: 0.9814 - val_loss: 0.4249 - val_accuracy: 0.8806
Epoch 18/50
68/68 [==============================] - 0s 938us/step - loss: 0.0728 - accuracy: 0.9805 - val_loss: 0.4228 - val_accuracy: 0.8917
Epoch 19/50
68/68 [==============================] - 0s 923us/step - loss: 0.0681 - accuracy: 0.9833 - val_loss: 0.4260 - val_accuracy: 0.8917
Epoch 20/50
68/68 [==============================] - 0s 953us/step - loss: 0.0634 - accuracy: 0.9889 - val_loss: 0.4480 - val_accuracy: 0.8944
Epoch 21/50
68/68 [==============================] - 0s 971us/step - loss: 0.0608 - accuracy: 0.9861 - val_loss: 0.4291 - val_accuracy: 0.8917
Epoch 22/50
68/68 [==============================] - 0s 961us/step - loss: 0.0574 - accuracy: 0.9879 - val_loss: 0.4460 - val_accuracy: 0.8917
Epoch 23/50
68/68 [==============================] - 0s 972us/step - loss: 0.0535 - accuracy: 0.9889 - val_loss: 0.4339 - val_accuracy: 0.8889
Epoch 24/50
68/68 [==============================] - 0s 953us/step - loss: 0.0510 - accuracy: 0.9889 - val_loss: 0.4394 - val_accuracy: 0.8944
Epoch 25/50
68/68 [==============================] - 0s 959us/step - loss: 0.0490 - accuracy: 0.9898 - val_loss: 0.4456 - val_accuracy: 0.8833
Epoch 26/50
68/68 [==============================] - 0s 972us/step - loss: 0.0461 - accuracy: 0.9917 - val_loss: 0.4377 - val_accuracy: 0.8972
Epoch 27/50
68/68 [==============================] - 0s 964us/step - loss: 0.0427 - accuracy: 0.9926 - val_loss: 0.4262 - val_accuracy: 0.8917
Epoch 28/50
68/68 [==============================] - 0s 956us/step - loss: 0.0423 - accuracy: 0.9944 - val_loss: 0.4533 - val_accuracy: 0.8972
Epoch 29/50
68/68 [==============================] - 0s 972us/step - loss: 0.0413 - accuracy: 0.9935 - val_loss: 0.4503 - val_accuracy: 0.8972
Epoch 30/50
68/68 [==============================] - 0s 955us/step - loss: 0.0397 - accuracy: 0.9917 - val_loss: 0.4468 - val_accuracy: 0.8972
Epoch 31/50
68/68 [==============================] - 0s 954us/step - loss: 0.0370 - accuracy: 0.9926 - val_loss: 0.4655 - val_accuracy: 0.8944
Epoch 32/50
68/68 [==============================] - 0s 951us/step - loss: 0.0350 - accuracy: 0.9926 - val_loss: 0.4370 - val_accuracy: 0.8917
Epoch 33/50
68/68 [==============================] - 0s 956us/step - loss: 0.0338 - accuracy: 0.9944 - val_loss: 0.4615 - val_accuracy: 0.8972
Epoch 34/50
68/68 [==============================] - 0s 972us/step - loss: 0.0327 - accuracy: 0.9954 - val_loss: 0.4541 - val_accuracy: 0.8972
Epoch 35/50
68/68 [==============================] - 0s 938us/step - loss: 0.0318 - accuracy: 0.9935 - val_loss: 0.4485 - val_accuracy: 0.8972
Epoch 36/50
68/68 [==============================] - 0s 958us/step - loss: 0.0290 - accuracy: 0.9963 - val_loss: 0.4737 - val_accuracy: 0.8972
Epoch 37/50
68/68 [==============================] - 0s 954us/step - loss: 0.0271 - accuracy: 0.9963 - val_loss: 0.4676 - val_accuracy: 0.9000
Epoch 38/50
68/68 [==============================] - 0s 952us/step - loss: 0.0275 - accuracy: 0.9963 - val_loss: 0.4745 - val_accuracy: 0.9028
Epoch 39/50
68/68 [==============================] - 0s 963us/step - loss: 0.0246 - accuracy: 0.9972 - val_loss: 0.4777 - val_accuracy: 0.9028
Epoch 40/50
68/68 [==============================] - 0s 964us/step - loss: 0.0244 - accuracy: 0.9972 - val_loss: 0.4763 - val_accuracy: 0.9000
Epoch 41/50
68/68 [==============================] - 0s 953us/step - loss: 0.0249 - accuracy: 0.9963 - val_loss: 0.4775 - val_accuracy: 0.8972
Epoch 42/50
68/68 [==============================] - 0s 951us/step - loss: 0.0232 - accuracy: 0.9981 - val_loss: 0.4792 - val_accuracy: 0.9000
Epoch 43/50
68/68 [==============================] - 0s 985us/step - loss: 0.0225 - accuracy: 0.9954 - val_loss: 0.4840 - val_accuracy: 0.8972
Epoch 44/50
68/68 [==============================] - 0s 947us/step - loss: 0.0199 - accuracy: 0.9981 - val_loss: 0.5112 - val_accuracy: 0.8972
Epoch 45/50
68/68 [==============================] - 0s 961us/step - loss: 0.0196 - accuracy: 0.9981 - val_loss: 0.4782 - val_accuracy: 0.8944
Epoch 46/50
68/68 [==============================] - 0s 935us/step - loss: 0.0188 - accuracy: 0.9991 - val_loss: 0.5014 - val_accuracy: 0.9028
Epoch 47/50
68/68 [==============================] - 0s 964us/step - loss: 0.0191 - accuracy: 0.9981 - val_loss: 0.5121 - val_accuracy: 0.9056
Epoch 48/50
68/68 [==============================] - 0s 931us/step - loss: 0.0167 - accuracy: 0.9991 - val_loss: 0.4977 - val_accuracy: 0.8917
Epoch 49/50
68/68 [==============================] - 0s 951us/step - loss: 0.0169 - accuracy: 0.9981 - val_loss: 0.5203 - val_accuracy: 0.9056
Epoch 50/50
68/68 [==============================] - 0s 970us/step - loss: 0.0164 - accuracy: 0.9991 - val_loss: 0.4874 - val_accuracy: 0.8972
Traceback (most recent call last):
  File "digits_model.py", line 52, in <module>
    model, x_test, y_test = get_model()
  File "digits_model.py", line 41, in get_model
    return Exp

NameError: name 'Exp' is not defined
(base) zeta@changwhan-asus:~/Arduino/DigitsExample$

In the digits_model.py, "return Exp" seems to be an error.
model.fit(x_train, y_train, epochs=50, batch_size=16,
validation_data=(x_validate, y_validate))
return Exp

Windows 10 + Wio Terminal: 'Eloquent' does not name a type

I am trying to use the Eloquent Library with the Seeed Wio Terminal on my Windows 10. When I try to compile the SineExample, it gives me this error:

SineExample:10:1: error: 'Eloquent' does not name a type
 Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml;
 ^~~~~~~~
C:\Users\rauna\OneDrive\Documents\Arduino\libraries\EloquentTinyML\examples\SineExample\SineExample.ino: In function 'void setup()':
SineExample:15:5: error: 'ml' was not declared in this scope
     ml.begin(sine_model);
     ^~
C:\Users\rauna\OneDrive\Documents\Arduino\libraries\EloquentTinyML\examples\SineExample\SineExample.ino: In function 'void loop()':
SineExample:24:27: error: 'ml' was not declared in this scope
         float predicted = ml.predict(input);
                           ^~
exit status 1
'Eloquent' does not name a type

Error in output prediction of LSTM model with EloquentTinyML version 2.4.3

Hi all,
I am trying to solve the issue but was not able since a month .
I do need your help to find out what is not working in order to move forward with my project.
I am trying to implement an LSTM model to predict temperature and humidity but the output is giving me 0 after all efforts
I have used xxd to convert my tflite model to en h file since the tinymlgen kept giving me error.
libraries for model in colab:
Python 3.7.15
TF version: 2.9.2
Keras: 2.9.0
Numpy: 1.21.6
Pandas: 1.3.5
implementation librairy:
Arduino IDE 2.0.0
EloquentTinyML version 2.4.3
ESP 32 (dev module board)

please help me find a solution

below the link of the project :

https://github.com/koulnodji6056/Prediction_LSTM_model_EloquentTinyML_library

predict function predict(input, output) supports either int/int or float/float.?

WARNING: library Arduino_OV767X claims to run on mbed architecture(s) and may be incompatible with your current board which runs on mbed_nano architecture(s).
C:\Users\User\Documents\Cam Cris-copia\converted_tinyml\tm_template_script\cri_copi\cri_copi.ino: In function 'void loop()':
C:\Users\User\Documents\Cam Cris-copia\converted_tinyml\tm_template_script\cri_copi\cri_copi.ino:89:45: error: invalid conversion from 'tflite::ErrorReporter*' to 'int' [-fpermissive]
input->data.int8)) {
^
C:\Users\User\Documents\Cam Cris-copia\converted_tinyml\tm_template_script\cri_copi\cri_copi.ino:89:45: error: invalid conversion from 'int' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
C:\Users\User\Documents\Cam Cris-copia\converted_tinyml\tm_template_script\cri_copi\cri_copi.ino:89:45: error: too many arguments to function 'bool GetImage(int, int, int, uint8_t*)'
In file included from C:\Users\User\Documents\Cam Cris-copia\converted_tinyml\tm_template_script\cri_copi\cri_copi.ino:6:0:
C:\Users\User\Documents\Cam Cris-copia\converted_tinyml\tm_template_script\cri_copi\image_provider.h:21:6: note: declared here
bool GetImage(int image_width, int image_height, int channels, uint8_t* image_data);
^~~~~~~~

exit status 1

Compilation error: invalid conversion from 'tflite::ErrorReporter*' to 'int' [-fpermissive]

When I try to compile the program i get this error, but in the issues section i already see that a user face up something similar, especifically the issue number 34.
In this issue you mention "I will fix the library on this. For now, declare your input as float so you can use the float/float version of predict.", and I want to know if you already solved it or not.
Or maybe you can tell me how to proceed.

Possible issue with multi-class models.

Hi,

I tried to deploy a 30 input to a 52 class output model using your library (like the frictionless approach btw). All classes come out as 0.00. I have retrained the models, made sure the scales are within float values range, and still no success. Running it on an ESP32.

I have also tried a more minimal 2-in, 2-out model, which did not work either.

Any suggestions on what else I could try or is this an issue with the library?

`#include <EloquentTinyML.h>
#include "my_model.h"

#define NUMBER_OF_INPUTS 2
#define NUMBER_OF_OUTPUTS 2
#define TENSOR_ARENA_SIZE 1024

Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml(my_model);

float arry[2]={0.0,1.0};
float out_arry[2]={0.0,0.0};

void setup() {
// put your setup code here, to run once:
Serial.begin(250000);
}

void loop() {
// put your main code here, to run repeatedly:
ml.predict(arry,out_arry);
Serial.print(out_arry[0]);
Serial.print(' ');
Serial.println(out_arry[1]);
delay(50);
arry[0] = 1.0;
ml.predict(arry,out_arry);
Serial.print(out_arry[0]);
Serial.print(' ');
Serial.println(out_arry[1]);
delay(50);
arry[1] = 0.0;
ml.predict(arry,out_arry);
Serial.print(out_arry[0]);
Serial.print(' ');
Serial.println(out_arry[1]);
delay(50);
arry[0] = 0.0;
ml.predict(arry,out_arry);
Serial.print(out_arry[0]);
Serial.print(' ');
Serial.println(out_arry[1]);
delay(50);
}`

Issue on the Colab

Hi Simone,

Thanks for your very nice code! Really appreciate it!
I have the same issue with Radhanand Anantha who post a question on your blog. https://eloquentarduino.github.io/2020/11/tinyml-on-arduino-and-stm32-cnn-convolutional-neural-network-example/#tochow-to-run-a-cnn-on-arduino-and-stm32-boards-with-eloquenttinyml
I also use colab to generate the model and finally the model size is about 5000 instead of 21448. The code is totally the same with yours because I just copied it to verify.
Here is the link of colab code. Could you please have a look? Thanks!
https://colab.research.google.com/drive/1_KE3OJ5uWD4bD-DITsQ4N6J8N8KDRorT?usp=sharing

digits_model.py

I found the fix.

When running tinymlgen, optimize default is True,
the generated model file is quite small and cause ESP32 keep aborting.

After I modify digits_model.py to set optimize = False, like below :
c_code = port(model, variable_name='digits_model', pretty_print=True, optimize=False)
with open('digits_model.h', 'w') as f:
print(c_code, file=f)

My Arduino example TinyML_Digit are running on ESP32 now !

Not able to run the SineFromInternetExample.ino on Nano RP2040

Hello,
I'm trying the SineFromInternetExample.ino example on my Nano RP2040 everything works fine until it tries to load the model : ml.begin(model)
at that point the board is stuck. From the Serial Monitor I get :

Model size is: 2280

Model content: 1C 0 0 0 54 46 4C 33 14 0 20 0 4 0 8 0 C 0 10 0  ... A6 C0 AD 6F DD AA 9 61 4A DD B0 B8 FF 51 3B A0 57 7E 7F 72 

so it seems to me I able to get the model from the server.

Any suggestions on what I m doing wrong ?

Thanks

Support for RNN (LSTM)

Hi, would you know if there is a way to implement RNN in TFLite micro? I use LSTM for time series prediction but I have this error.

Only 1 subgraph is currently supported.

tinymlgen

I used TinyMLGen to create a header file to incorporate into EloquentTinyML and it created my model as

const unsigned char model_data[] DATA_ALIGN_ATTRIBUTE = ....

When I compile I get the following error:

TextClassifierExample:13:95: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

Of course, I can simply remove the "const" but on the Arduino ARM boards the const keyword is also used to put the code into flash rather than ram, similar to the PROGMEM keyword on the AVR boards.

The solution seems to be to cast the variable but I was wondering if theree was a better way.

Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml((unsigned char*)model_data);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.