Skip to main content
E0106: layer dimension mismatch

What happened

During the compiler’s validate pass, it found that layer N expects expected input features, but layer N-1 produces got output features. The two layers cannot be connected.

Why

The most common cause: you changed the size of one layer but forgot to update the adjacent layer. For example:

How to fix

  1. Check each Dense layer — out_features of layer N must match in_features of layer N+2 (accounting for the LIF layer in between).
  2. Use a consistent naming pattern, e.g. hidden_size = 512, and reference the variable throughout:

Example