Class MLP

Object
MLP

public class MLP
extends Object
This class represents layered neural networks. Computing a networks output on a sample is done using the apply(ArrayList) method. Prediction is done using Predict. Training a network is done using the fit(List, List, int, double) method. Instances of this class are immutable.
  • Constructor Details

  • Method Details

    • getLayer

      public Layer getLayer​(int i)
    • fit

      public Computation<MLP,​ProtocolBuilderNumeric> fit​(List<ArrayList<DRes<SFixed>>> data, List<ArrayList<DRes<SFixed>>> labels, int epochs, double learningRate)
      Train this neural network using single step training (batch size = 1) and return a new neural network with the updated weights.
      Parameters:
      data - The training data.
      labels - The expected outputs.
      epochs - The number of epochs to run the training. One epoch is an iteration over all training data.
      learningRate - The learning rate.
      Returns:
      A new neural network with weights updated from this network.
    • apply

      public Computation<ArrayList<DRes<SFixed>>,​ProtocolBuilderNumeric> apply​(ArrayList<DRes<SFixed>> input)
      Apply this neural network in an input vector.