/** * Fit the model * * @param examples the examples to classify (one example in each row) * @param labels the labels for each example (the number of labels must match */ @Override public void fit(INDArray examples, int[] labels) { INDArray outcomeMatrix = FeatureUtil.toOutcomeMatrix(labels, numLabels()); fit(examples, outcomeMatrix); }
/** * Fit the model * * @param examples the examples to classify (one example in each row) * @param labels the labels for each example (the number of labels must match */ @Override public void fit(INDArray examples, int[] labels) { INDArray outcomeMatrix = FeatureUtil.toOutcomeMatrix(labels, numLabels()); fit(examples, outcomeMatrix); }
/** * Fit the model * * @param examples the examples to classify (one example in each row) * @param labels the labels for each example (the number of labels must match */ @Override public void fit(INDArray examples, int[] labels) { org.deeplearning4j.nn.conf.layers.OutputLayer layerConf = (org.deeplearning4j.nn.conf.layers.OutputLayer) getOutputLayer().conf().getLayer(); fit(examples, FeatureUtil.toOutcomeMatrix(labels, layerConf.getNOut())); }