예제 #1
0
 public NeuralNetwork.Builder setRegularization(double lambda) {
   net.lambda = lambda;
   return this;
 }
예제 #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;
 }