SciLib.Neuro
Class Layer

java.lang.Object
  extended by SciLib.Neuro.Layer

public class Layer
extends java.lang.Object

This class defines a layer in a neural network.


Field Summary
(package private)  vector error
           
(package private)  vector in
           
(package private)  int inSize
           
(package private)  matrix lastDelta
           
(package private)  vector out
           
(package private)  int outSize
           
(package private)  matrix weight
           
 
Constructor Summary
Layer()
          Make an empty layer
Layer(int n, int m)
          Make a nxm layer
 
Method Summary
 void generate()
          generate the parameters of the layer
 vector getError()
          get error vector
 vector getInput()
          get input vector
 int getInputSize()
          get input size
 matrix getLastDelteMatrix()
          get last delta matrix
 vector getOutput()
          get output vector
 int getOutputSize()
          get output size
 matrix getWeight()
          get weight matrix
 void initWeight(double a, double b)
          Initialize the weight matrix with random values between a and b
 void resize(int n, int m)
          resize the layer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inSize

int inSize

outSize

int outSize

in

vector in

out

vector out

error

vector error

weight

matrix weight

lastDelta

matrix lastDelta
Constructor Detail

Layer

public Layer()
Make an empty layer


Layer

public Layer(int n,
             int m)
Make a nxm layer

Parameters:
n - An integer value, the input size
m - An integer value, the output size
Method Detail

initWeight

public void initWeight(double a,
                       double b)
Initialize the weight matrix with random values between a and b

Parameters:
a - A double value
b - A double value

getInputSize

public int getInputSize()
get input size

Returns:
an integer value

getOutputSize

public int getOutputSize()
get output size

Returns:
an integer value

getError

public vector getError()
get error vector

Returns:
A vector

getInput

public vector getInput()
get input vector

Returns:
A vector

getOutput

public vector getOutput()
get output vector

Returns:
A vector

getWeight

public matrix getWeight()
get weight matrix

Returns:
A matrix

getLastDelteMatrix

public matrix getLastDelteMatrix()
get last delta matrix

Returns:
A matrix

resize

public void resize(int n,
                   int m)
resize the layer

Parameters:
n - An integer value, the input size
m - An integer value, the output size

generate

public void generate()
generate the parameters of the layer