BoundsError: attempt to access n-element UnitRange{Int32} at index [n+1]


I’m recently using Knet and working on a CNN.
I have a dataset-input of 20000x1x1x200000 which I use for training

As soon as i start training with progress!(sgd(dtrn,ncycle(n))), I get following the error:

BoundsError: attempt to access 2n-element UnitRange{Int32} at index [2n+1]

depending on the batchsize * 2.
On my local computer the code is working fine, tested it and everything works with smaller dataset-examples. On the server, where Knet works fine, my code crashes tho.

Any suggestions how to fix?

found the error, forgot to change the outputlayer to the size of number of datasets.