Skip to content

Commit

Permalink
Comments Updateds
Browse files Browse the repository at this point in the history
  • Loading branch information
mroodschild committed Apr 25, 2018
1 parent f99cb66 commit cd22e1d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/org/gitia/froog/Feedforward.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,26 @@ public void setParameters(SimpleMatrix weights) {
}
}

/**
*
* @return
*/
public List<Layer> getLayers() {
return layers;
}

/**
*
* @param layers
*/
public void setLayers(List<Layer> layers) {
this.layers = layers;
}

/**
*
* @return
*/
@Override
public String toString() {
String info = "";
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/gitia/froog/NeuralNetwork.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,18 @@
*/
public interface NeuralNetwork {

/**
*
* @param input
* @return
*/
public SimpleMatrix output(double[] input);

/**
*
* @param input
* @return
*/
public SimpleMatrix output(SimpleMatrix input);

}
57 changes: 57 additions & 0 deletions src/main/java/org/gitia/froog/layer/Layer.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public class Layer {

protected Random random = new Random();

/**
*
*/
public Layer() {
}

Expand Down Expand Up @@ -128,6 +131,12 @@ public Layer(int input, int output, String funcion) {
this(input, output, funcion, new Random());
}

/**
*
* @param W
* @param B
* @param funcion
*/
public Layer(SimpleMatrix W, SimpleMatrix B, String funcion) {
this.W = W;
this.B = B;
Expand Down Expand Up @@ -220,50 +229,98 @@ public SimpleMatrix getW() {
return W;
}

/**
*
* @param W
*/
public void setW(SimpleMatrix W) {
this.W = W;
}

/**
*
* @return
*/
public SimpleMatrix getB() {
return B;
}

/**
*
* @param B
*/
public void setB(SimpleMatrix B) {
this.B = B;
}

/**
*
* @return
*/
public Random getRandom() {
return random;
}

/**
*
* @param random
*/
public void setRandom(Random random) {
this.random = random;
}

/**
*
* @return
*/
public TransferFunction getFunction() {
return function;
}

/**
*
* @param function
*/
public void setFunction(TransferFunction function) {
this.function = function;
}

/**
*
* @param keepProb
*/
public void setKeepProb(double keepProb) {
this.keepProb = keepProb;
}

/**
*
* @return
*/
public double getKeepProb() {
return keepProb;
}

/**
*
* @param Drop
*/
public void setDrop(SimpleMatrix Drop) {
this.Drop = Drop;
}

/**
*
* @return
*/
public SimpleMatrix getDrop() {
return Drop;
}

/**
*
* @return
*/
@Override
public String toString() {
return function.toString();
Expand Down

0 comments on commit cd22e1d

Please sign in to comment.