Class CNNExamples

java.lang.Object
org.tribuo.interop.tensorflow.example.CNNExamples

public abstract class CNNExamples extends Object
Static factory methods which produce Convolutional Neural Network architectures.
  • Method Details

    • buildLeNetGraph

      public static GraphDefTuple buildLeNetGraph(String inputName, int imageSize, int pixelDepth, int numOutputs)
      Builds a LeNet 5 style CNN (usually used for MNIST).

      Expects there to only be a single colour pixel (i.e., a grayscale image). Operates on square images.

      Unlike the original LeNet 5 it uses ReLU activations.

      Parameters:
      inputName - The input placeholder name.
      imageSize - The image width and height.
      pixelDepth - The maximum pixel value (usually 255).
      numOutputs - The number of output dimensions (usually 10 for MNIST).
      Returns:
      A GraphRecord containing the LeNet graph and the relevant op names.