Class HiddenLayerBuilder

java.lang.Object
smile.base.mlp.LayerBuilder
smile.base.mlp.HiddenLayerBuilder

public class HiddenLayerBuilder extends LayerBuilder
The builder of hidden layers.
  • Constructor Details

    • HiddenLayerBuilder

      public HiddenLayerBuilder(int neurons, double dropout, ActivationFunction activation)
      Constructor.
      Parameters:
      neurons - the number of neurons.
      dropout - the dropout rate.
      activation - the activation function.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • build

      public HiddenLayer build(int p)
      Description copied from class: LayerBuilder
      Builds a layer.
      Specified by:
      build in class LayerBuilder
      Parameters:
      p - the number of input variables (not including bias value).
      Returns:
      a layer.