Multilabel classifier with ComputationGraphConfig gives error

I want to have predict which classes may apply to the input. Each input may belong to any of several classes, not just one. I believe that this is a case multilabel classification in which I would need multiple output layers, correct?

I believe that the following code, using a ComputationGraphConfig and MultiDataSetIterator, is the correct approach? Is that right? And if so, I get the error below unfortunately. I am not sure what the cause is, everything seems to be otherwise setup correctly?

This sort of classifier has very few examples and so it is not easy to determine what might cause this error. Any suggestions?

public static String dataLocalPath;

public static void main(String[] args) {
    int batchSize = 4;
    int numClasses = 3;
    int columnsInput = -1;


    MultiDataSetIterator iterator = new RecordReaderMultiDataSetIterator.Builder(batchSize)
            .addReader("csvInput", inputReader)
            .addReader("csvLabels", labelsReader)
            .addInput("csvInput", 0, columnsInput - 1) 
            .addOutputOneHot("csvLabels", 0, numClasses)
            .addOutputOneHot("csvLabels", 1, numClasses)
            .addOutputOneHot("csvLabels", 2, numClasses)
            .addOutputOneHot("csvLabels", 3, numClasses)
            .addOutputOneHot("csvLabels", 4, numClasses)
            .addOutputOneHot("csvLabels", 5, numClasses)
            .addOutputOneHot("csvLabels", 6, numClasses)
            .addOutputOneHot("csvLabels", 7, numClasses)
            .addOutputOneHot("csvLabels", 8, numClasses)
            .addOutputOneHot("csvLabels", 9, numClasses)
            .addOutputOneHot("csvLabels", 10, numClasses)
            .addOutputOneHot("csvLabels", 11, numClasses)
            .build();

    ComputationGraphConfiguration conf = new NeuralNetConfiguration.Builder()
            .seed(123)
            //.updater(new Sgd(0.01))
            .graphBuilder()
            .addInputs("input")
            .addLayer("L1", new DenseLayer.Builder()
                    .nIn(columnsInput)
                    .nOut(4)
                    .activation(Activation.SIGMOID)
                    .build(), "input")
            .addLayer("out1", new OutputLayer.Builder()
                    .activation(Activation.SIGMOID)
                    .lossFunction(LossFunctions.LossFunction.XENT)
                    .nIn(4).nOut(1).build(), "L1")
            .addLayer("out2", new OutputLayer.Builder()
                    .activation(Activation.SIGMOID)
                    .lossFunction(LossFunctions.LossFunction.XENT)
                    .nIn(4).nOut(1).build(), "L1")
            
             /*
             More output layers here
             */
            .addLayer("out12", new OutputLayer.Builder()
                    .activation(Activation.SIGMOID)
                    .lossFunction(LossFunctions.LossFunction.XENT)
                    .nIn(4).nOut(1).build(), "L1")
            .setOutputs("out1", "out2", "out3", "out4", "out5", "out6", "out7", "out8", "out9", "out10", "out11", "out12")
            .build();

    ComputationGraph network = new ComputationGraph(conf);
    network.init();
    network.setListeners(new ScoreIterationListener(100));
    network.fit(iterator);
}

}
[main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [CpuBackend] 
backend
[main] INFO org.nd4j.nativeblas.NativeOpsHolder - Number of threads 
used for NativeOps: 8
[main] INFO org.nd4j.nativeblas.Nd4jBlas - Number of threads used for 
BLAS: 8
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - 
Backend used: [CPU]; OS: [Mac OS X]
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - 
Cores: [16]; Memory: [4.0GB];
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - 
Blas vendor: [MKL]
[main] INFO org.deeplearning4j.nn.graph.ComputationGraph - Starting 
ComputationGraph with WorkspaceModes set to [training: ENABLED; 
inference: ENABLED], cacheMode set to [NONE]
Exception in thread "AMDSI prefetch thread" 
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index 6293 out of bounds for length 6293
at org.deeplearning4j.datasets.iterator.AsyncMultiDataSetIterator$AsyncPrefet. chThread.run(AsyncMultiDataSetIterator.java:396)
Caused by: java.lang.IndexOutOfBoundsException: Index 6293 out of bounds for length 6293

I figured this out, I will leave a note here for anyone that might stumble across it later.

The code had some issues but this error was due to the data file being malformed by some errors in a pre-processing script. The lines of csvInput were not all the same length, that was the problem.