RuntimeError: The maximum input event value is 15, got 123

I know this has been asked before, but there wasn’t really a clear explanation. I keep getting this error when I try to train. I tried using a different classifier. No joy.

RuntimeError: The maximum input event value is 15, got 123

Project ID: 184199

Context/Use case: This error was thrown following the Edge Impulse tutorial on this site. I am using a seeeduino xiao ble sense hooked to a .66 grove OLED and li-po battery. Would appreciate any insight!

Here is more context:

Profiling akida model…
WARNING: Requested model can’t be fully mapped to hardware. Reason:
WARNING: Error when mapping layer ‘dense’: Weight bits should be between 1 and 4 inclusive.
WARNING: Reported program size, number of NPs and nodes may not be accurate!
Traceback (most recent call last):
File “/home/”, line 339, in
File “/home/”, line 317, in main_function
metadata = ei_tensorflow.profiling.get_model_metadata(model, validation_dataset, Y_test, samples_dataset, Y_samples, has_samples,
File “/app/./resources/libraries/ei_tensorflow/”, line 713, in get_model_metadata
akida_perf = profile_model(model_type, None, None, validation_dataset, Y_test, X_samples,
File “/app/./resources/libraries/ei_tensorflow/”, line 245, in profile_model
prediction, prediction_train, prediction_test = make_predictions(mode, model, validation_dataset, Y_test,
File “/app/./resources/libraries/ei_tensorflow/”, line 206, in make_predictions
return ei_tensorflow.brainchip.model.make_predictions(mode, akida_model_path, validation_dataset,
File “/app/./resources/libraries/ei_tensorflow/brainchip/”, line 53, in make_predictions
prediction = predict(model_path, validation_dataset, len(Y_test))
File “/app/./resources/libraries/ei_tensorflow/brainchip/”, line 95, in predict
output = model.predict(item)
RuntimeError: The maximum input event value is 15, got 123
Application exited with code 1

Job failed (see above)

Hi @Aezarien

I took a look at your project and see that you’ve successfully trained your model.
Was the above erorr received with the current impulse? or did you change it? Did you have “Classification (Keras) - Brainchip Akida” block?

1 Like

I did manage to get it to work! Having all kinds of goof ups, as I came back to update the post and didn’t hit enter. I really appreciate you taking the time to look at it, though.

Apparently, the Classification (Keras) - Brainchip Akida learning block will not train on this project. I’m not sure why. The current learning block - The standard Classification will. I changed it earlier but I didn’t save it, which is why I didn’t think it worked. First time user growing pains.

Those following the Xiao BLE motion recognition tutorial will also have issues compiling because the name of the library is different than what is written in the .ino file.

Ah yes that explains it. This is a different learning block indeed. Glad it’s working for you now.

Regarding the tutorial can you share the URL?

1 Like


@Aezarien Thanks for sharing. I’ve taken a look at the tutorial.

Those following the Xiao BLE motion recognition tutorial will also have issues compiling because the name of the library is different than what is written in the .ino file.

Are you referring to (1) the original issue with Classification vs Akida Classification learn block? or (2) regarding the naming of the Arduino Library deployment. I’ll try address them both.

  1. In the tutorial there’s a screenshot of the impulse in step 11, which should be clear enough. I understand however how at a first glance both blocks can be mistaken for the other. I’m happy to hear if you have any tips on how this can be improved.

  2. The name of the main header to include (when you deploy a Arduino Library) does depend on your project name and that is fine. This allows you to have a single .ino file (e.g. downloaded from Step 17), import different Arduino libraries and by including a different Edge Impulse Arduino library (referenced by the .h in your sketch) you’d be able to build different applications.

Note: in a single sketch you can include only a single EdgeImpulse Arduino library. To learn more about our Arduino Library deploy option check out our docs.

I hope this clarrifies the topic more for you

1 Like

I appreciate you trying to clarify, but no. That’s not my issue. The learning block they tell you to use is not working. And if you look at the screen shot, it clearly shows them using the flatten processing block after giving these written instructions:

“Click Create impulse → Add a processing block → Choose Spectral Analysis → Add a learning block → Choose Classification (Keras) → Save Impulse”

I got it to work by using the classification which is not Keras, but the standard one, at the top of the learning block selection dialogue box. Like I said before, I do not know why it works this way, but I could not get it to work with their instructions. I’m not saying it is wrong. I just couldn’t get it to work following their instructions.

As far as the name - I named my project what they named their project, but their code does not reflect that. Easy fix, but may be frustrating for a new user, so I am just putting it out there. If anyone has a problem compiling, check to make sure the library name called in the .ino matches exactly what is on the folder and .h file.

Thanks for the tip on not adding more than one Edge Impulse library. That will probably save me hours of wondering why something doesn’t work in the future. I’ll check it out!

@Aezarien Thanks for clarrifying.

Now I see. The Classification (Keras) mentioned in the tutorial has been renamed to Classification into the Studio. I see how it can be confusing if it can be confused with Classification (Keras) - BrainChip Akida™. This is a specialized block (you can read about it here). This wouldn’t have worked and is not the one you wanted. Which you already know now :stuck_out_tongue:

Thanks for reporting and because of this post hopefully others following the tutorial in the future will save themselves agony.

// Raul

1 Like

That makes sense, thank you. I am going to leave a message with them, too but what I had before was based off files from EdgeImpulse. I wanted to make sure I could get it to work before I started to invest any time. So, I am making my own files today and when I get my own version to work, I plan to leave a message on their board with some of the things I found confusing. Not complaining, just maybe adding some perspective.

Thank you for sticking with me on this to figure out why it wasn’t working! I couldn’t find anything on it really, so I appreciate the help.

1 Like