docs: public void setLayerMaskArrays(INDArray[] featureMaskArrays, INDArray[] labelMaskArrays) {
          this.clearLayerMaskArrays();
          this.inputMaskArrays = featureMaskArrays;
          this.labelMaskArrays = labelMaskArrays;
  
          if (featureMaskArrays != null) {
              if (featureMaskArrays.length != numInputArrays) {
                  throw new IllegalArgumentException("Invalid number of feature mask arrays");
              }
  
              long minibatchSize = -1;
              for (INDArray i : featureMaskArrays) {
                  if (i != null) {
                      minibatchSize = i.size(0);
                  }
              }
  
              //Here: need to do forward pass through the network according to the topological ordering of the network
  
              Map<Integer, Pair<INDArray, MaskState>> map = new HashMap<>();
              for (int i = 0; i < topologicalOrder.length; i++) {
                  GraphVertex current = vertices[topologicalOrder[i]];
  
                  if (current.isInputVertex()) {
                      INDArray fMask = featureMaskArrays[current.getVertexIndex()];
                      map.put(current.getVertexIndex(), new Pair<>(fMask, MaskState.Active));
                  } else {
                      VertexIndices[] inputVertices = current.getInputVertices();
  
                      //Now: work out the mask arrays to feed forward...
                      INDArray[] inputMasks = null; //new INDArray[inputVertices.length];
                      MaskState maskState = null;
                      for (int j = 0; j < inputVertices.length; j++) {
                          Pair<INDArray, MaskState> p = map.get(inputVertices[j].getVertexIndex());
                          if (p != null) {
                              if (inputMasks == null) {
                                  inputMasks = new INDArray[inputVertices.length];
                              }
                              inputMasks[j] = p.getFirst();
                              if (maskState == null || maskState == MaskState.Passthrough) {
                                  maskState = p.getSecond();
                              }
                          }
                      }
  
                      // FIXME: int cast
                      Pair<INDArray, MaskState> outPair =
                              current.feedForwardMaskArrays(inputMasks, maskState, (int) minibatchSize);
                      map.put(topologicalOrder[i], outPair);
                  }
              }
          }
  
          if (labelMaskArrays != null) {
              if (labelMaskArrays.length != numOutputArrays) {
                  throw new IllegalArgumentException("Invalid number of label mask arrays");
              }
              for (int i = 0; i < labelMaskArrays.length; i++) {
                  if (labelMaskArrays[i] == null) {
                      // This output doesn't have a mask, we can skip it.
                      continue;
                  }
                  String outputName = configuration.getNetworkOutputs().get(i);
                  GraphVertex v = verticesMap.get(outputName);
                  Layer ol = v.getLayer();
                  ol.setMaskArray(labelMaskArrays[i]);
              }
          }
      }