Custom NN in Expert Mode fails training or gets stuck in retraining。

Hi everyone,

I’m using Edge Impulse Expert Mode to build a custom neural network for my embedded ML project, but I’m facing two consistent issues with my custom architectures:

  1. Many custom models fail to start training at all (either the process errors out immediately, or there’s no progress after several minutes).
  2. Even if initial training completes, the retraining/quantization phase always gets stuck indefinitely, with no further updates.

The default auto-generated models from Edge Impulse work perfectly with my dataset, so the issue seems specific to my custom network design. I want to understand:

  • What neural network architectures/layer types are fully compatible with Edge Impulse’s training and retraining pipeline?
  • Are there known patterns that cause these failures or hangs?

Hello @ESAC-SCJ first of all welcome to the Edge Impulse community!

Thanks for the detailed message. You are not the only one running into this when using Expert Mode.

Sometimes there are some compatibility constraints between custom architectures and the full Edge Impulse pipeline (training → retraining → quantization) rather than an issue with your dataset.

Could you please share more details about the custom models that you are using? Is your model compatible with your model needs to be compatible with TensorFlow/Keras? or quantization (int8) (e.g.)?

WIth that information we will know more to help you more!

Thanks!

Hi marcpous,

Thanks a lot for your reply and help!I’m using a custom SimpleRNN model in Expert Mode for a time-series regression task. My model structure is:Input(30,) → Reshape(10,3) → BatchNormalization → SimpleRNN(16) → Dense(8) → Dense(1).

I can finish training normally, but it always gets stuck during retraining/quantization or performance profiling.I’ve set disable_per_channel_quantization = True to disable all quantization.

Could you confirm this is the right way to avoid hanging?And does Edge Impulse support SimpleRNN in Expert Mode at all, or do I have to switch to 1DCNN?

Thanks again!

Hi @ESAC-SCJ

We now list the supported operators in our EON Compiler docs :smiley:

Looking at the EON Operator Matrix (TensorFlow 2.19 Matrix), this is most likely related to the SimpleRNN layer. In TensorFlow Lite, SimpleRNN commonly maps to recurrent sequence RNN operators. The matrix shows:

UNIDIRECTIONAL_SEQUENCE_RNN      TFLite builtin: ✓   TFLM supported: ✗   EI supported: ✗BIDIRECTIONAL_SEQUENCE_RNN       TFLite builtin: ✓   TFLM supported: ✗   EI supported: ✗RNN                              TFLite builtin: ✓   TFLM supported: ✗   EI supported: ✗

So while your model can train in Keras, the recurrent RNN operator generated during TensorFlow Lite conversion is not supported by the Edge Impulse/TFLM deployment path. That would explain why training can finish, but retraining, quantization, or profiling gets stuck or fails later in the pipeline.

Hope this helps, can you try substituting any ops?

Could you try replacing the SimpleRNN layer with supported ops, for example a small 1D CNN-style architecture using Conv1D, pooling/flattening, and Dense layers?

Best

Eoin