source: anac2020/BlingBling/src/main/java/geniusweb/blingbling/Ranknet/RanknetBuilder.java@ 14

Last change on this file since 14 was 1, checked in by wouter, 4 years ago

#1910 added anac2020 parties

File size: 716 bytes
Line 
1package geniusweb.blingbling.Ranknet;
2
3
4import java.util.LinkedList;
5import java.util.List;
6
7public class RanknetBuilder {
8 private List<Layer> layers;
9 private double learningRate = 1.0f;
10
11 public RanknetBuilder() {
12 this.layers = new LinkedList<Layer>();
13 }
14
15 public RanknetBuilder addLayer(Layer layer) {
16 layers.add(layer);
17
18 return this;
19 }
20
21 public RanknetBuilder setLearningRate(double rate) {
22 this.learningRate = rate;
23
24 return this;
25 }
26
27 public NeuralRankNet build() {
28 NeuralRankNet neuralNet = new NeuralRankNet();
29 neuralNet.setLayers(layers);
30 neuralNet.setLearningRate(learningRate);
31
32 return neuralNet;
33 }
34}
Note: See TracBrowser for help on using the repository browser.