Example #1
0
 public NeuralNetwork.Builder setRegularization(double lambda) {
   net.lambda = lambda;
   return this;
 }
Example #2
0
 /**
  * Adds a layer to the neural network.
  *
  * @param size The size of the layer.
  * @param function The activation function of the layer.
  */
 public NeuralNetwork.Builder addLayer(int input, int output, Activation function) {
   Layer l = new Layer(new LayerSize(input, output), function);
   net.addLayer(l);
   return this;
 }