code: public static INDArray reshapeVectorToTimeSeriesMask(INDArray timeSeriesMaskAsVector, int minibatchSize) {
          if (!timeSeriesMaskAsVector.isVector())
              throw new IllegalArgumentException("Cannot reshape mask: expected vector");
  
          val timeSeriesLength = timeSeriesMaskAsVector.length() / minibatchSize;
  
          return timeSeriesMaskAsVector.reshape('f', minibatchSize, timeSeriesLength);
      }
docs: Reshape time series mask arrays. This should match the assumptions (f order, etc) in RnnOutputLayer
  @param timeSeriesMaskAsVector    Mask array to reshape to a column vector
  @return                  Mask array as a column vector