|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.joone.engine.RTRLLearnerFactory.Weight
protected class RTRLLearnerFactory.Weight
A weight. In order to populate the weight matrix, we need to know where to find the weight in joone. The weight can either be a bias found inside a layer or a normal weight found inside a synapse. This class is used to store the weight as well as the indices needed to reference it inside the joone object. We also store a lot of indexing information, such as k and u, in this class for performance reasons. We try to iterate weights rather than loop some index i from 0 to n - 1 for example. This also applies elsewhere in this implementation.
Field Summary | |
---|---|
protected int |
i
The joone i index of this weight |
protected int |
j
The joone j index of this weight |
protected int |
K
The node K in Z from which this weight comes |
protected Layer |
layer
The joone layer which is used if this weight is a bias |
protected Synapse |
synapse
The joone synapse which is used if this weight is a normal synaptical weight |
Constructor Summary | |
---|---|
RTRLLearnerFactory.Weight(Layer layer,
int i,
int K)
Initialise this weight from a joone layer |
|
RTRLLearnerFactory.Weight(Synapse synapse,
int i,
int j,
int K)
Initialise this weight from a joone synapse. |
Method Summary | |
---|---|
void |
addDelta(double delta)
Add a given amount to this weight's delta |
void |
addWeight(double delta)
Update this weight with the given delta amount, also update the weight delta |
double |
getDelta()
Retrieve this weight's delta |
double |
getWeight()
Retrieve this weight |
void |
setDelta(double delta)
Set this weight's delta to a specific value |
void |
setWeight(double weight)
Set this weight to a specific value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int K
protected int i
protected int j
protected Layer layer
protected Synapse synapse
Constructor Detail |
---|
public RTRLLearnerFactory.Weight(Layer layer, int i, int K)
layer
- the joone layer where this is foundi
- the index into the layer at which this is foundK
- the indexpublic RTRLLearnerFactory.Weight(Synapse synapse, int i, int j, int K)
synapse
- the joone synapse where this is foundi
- the row in the synapse at which the weight is foundj
- the column in the synapse at which the weight is foundK
- the node in Z from which this weight is comingMethod Detail |
---|
public void addWeight(double delta)
public void setWeight(double weight)
public double getWeight()
public void addDelta(double delta)
public void setDelta(double delta)
public double getDelta()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |