Teachable Machine with Arduino Nano BLE 33

I’m trying to use the TFLite Person Detection example project as a template and insert my own model that I’ve created using Teachable Machine. However, it’s not working as expected, and giving a “Invoke Failed()” error in the serial monitor when I run the script on my Nano 33 BLE. Can someone please take a look and tell me what I did wrong?

Here is how I approached it:

  1. Create a model with Teachable Machine
  2. Download my model as a keras file
  3. Convert from Keras model to tflite model, and then integer quantize the model using the code here: Google Colaboratory
  4. Convert from tflite to .cc using : xxd -i converted_model.tflite > model_data.cc
  5. Replace value of g_person_detect_model_data_len with new value from my model_data.cc
  6. Replace model_data with new model data from my model_data.cc
  7. Use https://netron.app/ to visualize the network and see what MicroOpsResolvers need to be included. Include as necessary.

The only two files in the project that I touch at all are person_detection.ino and person_detection_model_data.cpp. Please help me figure out why it’s not working!!!

Has anyone deployed a teachable machine model to ARduino Nano BLE 33? If so, how did you do it?!