Class MLPExamples


public abstract class MLPExamples extends Object
Static factory methods which produce Multi-Layer Perceptron architectures.
  • Method Details

    • buildMLPGraph

      public static GraphDefTuple buildMLPGraph(String inputName, int numFeatures, int[] hiddenSizes, int numOutputs)
      Builds an MLP which expects the supplied number of inputs, has hiddenSizes.length hidden layers, before emitting numOutput outputs. Uses ReLU as the activation function for the hidden layers.
      inputName - The name of the input placeholder.
      numFeatures - The number of input features.
      hiddenSizes - The hidden layer sizes.
      numOutputs - The number of output dimensions.
      A pair of a graph and the name of the output operation.