private void readDescription(final NNTrainedModelBuilder builder, final String line) {
        int numInputs;
        int numHidden;
        int numOutputs;
        String[] sarr = line.split("\t");

        try {
            MediaType type = MediaType.parse(sarr[1]);
            numInputs = Integer.parseInt(sarr[2]);
            numHidden = Integer.parseInt(sarr[3]);
            numOutputs = Integer.parseInt(sarr[4]);
            builder.setNumOfInputs(numInputs);
            builder.setNumOfHidden(numHidden);
            builder.setNumOfOutputs(numOutputs);
            builder.setType(type);
        } catch (Exception e) {
            LOG.warn("Unable to parse the model configuration", e);
            throw new RuntimeException("Unable to parse the model configuration", e);
        }
    }
read the comments where the model configuration is written, e.g the
number of inputs, hiddens and output please ensure the first char in the
given string is # In this example grb model file, there are 4 elements 1)
type 2) number of input units 3) number of hidden units. 4) number of
output units.
tika-core/src/main/java/org/apache/tika/detect/NNExampleModelDetector.java