Hi,
Your target matrix dimensions should be 10 × 50000, not 25 × 50000. Your data must be arranged as:
- Inputs: an I × N matrix, where I is the number of features (25 here) and N is the number of samples (50000).
- Targets: an O × N matrix, where O is the number of output neurons (one per class—in your case 10 digits) and N is the number of samples.
T = zeros(10,50000); % 10 classes × 50000 samples
That error message inside nntool is actually masking an out-of-memory failure that happens earlier in the call to TRAIN.
Refer here for more details on the error: https://www.pianshen.com/ask/32443162216/
Workarounds:
- The simplest workaround is to upgrade MATLAB, then it can show you the real error and you can tune the memory usage accordingly.
- For your current version you can try training on a smaller or balanced subset, or stream your data in batches so you don’t build enormous temporary matrices.
Hope this helps!
