Training a network that outputs mxnet.NDArrays shape (27,1). I created a 3d array of labels of shape (27,1,210). Creation of data provider and subsequent training looks like the following:
navDataIter = mx.ArrayDataProvider(
:navData => trainingBatch.navBatch[“navInput”],
:navLinRegressOut1_label => trainingBatch.navBatch[“navLabel”];
batch_size=trainingBatch.navLength, shuffle=true)
mx.fit(nav.neuralParams.navModel,nav.neuralParams.navOptimizer,navDataIter,n_epoch=20)
BoundsError occurs as such:
BoundsError: attempt to access 27x1 Array{Float32,2} at index [Base.Slice(Base.OneTo(27)), 2].
It seems like correct array slice notation for a 2D array, except the data has one dimension. Perhaps a copy is created and concatenated for some reason? I’m not sure if this is the correct interpretation of what’s happening. Either way, this error alludes to an incorrect array access syntax.
Edit: It seems like the problem is resolved by using batch_size=0
.