Skip to content

Instantly share code, notes, and snippets.

@Tob-iee
Created May 30, 2022 16:55
Show Gist options
  • Save Tob-iee/5432ce29ef3ecb1ce110a2ce5c939987 to your computer and use it in GitHub Desktop.
Save Tob-iee/5432ce29ef3ecb1ce110a2ce5c939987 to your computer and use it in GitHub Desktop.
model file in cc format
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/model.h"
// We need to keep the data array aligned on some architectures.
#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 g_model[] DATA_ALIGN_ATTRIBUTE = {
0x20, 0x00, 0x00, 0x00, 0x54, 0x46, 0x4c, 0x33, 0x00, 0x00, 0x00, 0x00,
// <Lines omitted>
0x03, 0x00, 0x00, 0x00};
const int g_model_len = 18712;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment