I assume N is the number of data and n is you data_size. I think if you make:
- X 1xnx1xN
- The input layer: imageInputLayer([1 n])
- X_noisy of dimension Nxn and finally,
- net = trainNetwork(Xnoisy, X, layers, opts);
it should work. Make sure at the end that your inpout of your Denoising Autoencoder is the noisy data and the desired output is your "clean" data. A similar version that I implemented in MATLAB works fine for me and the dimensions match usign the regressionLayer like this.
