Class MLPExamples
java.lang.Object
org.tribuo.interop.tensorflow.example.MLPExamples
Static factory methods which produce Multi-Layer Perceptron architectures.
-
Method Summary
Modifier and TypeMethodDescriptionstatic GraphDefTuplebuildMLPGraph(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.
-
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.- Parameters:
inputName- The name of the input placeholder.numFeatures- The number of input features.hiddenSizes- The hidden layer sizes.numOutputs- The number of output dimensions.- Returns:
- A pair of a graph and the name of the output operation.
-