/** * Call this function to update the weight values at this unit. * After the weights have been updated at this unit, All the * input connections will then be called from this to have their * weights updated. * @param l The learning Rate to use. * @param m The momentum to use. */ public void updateWeights(double l, double m) { //the action the subclasses should perform is upto them //but if they coverride they should make a call to this to //call the method for all their inputs. if (!m_weightsUpdated) { for (int noa = 0; noa < m_numInputs; noa++) { m_inputList[noa].updateWeights(l, m); } m_weightsUpdated = true; } }
/** * Call this function to update the weight values at this unit. * After the weights have been updated at this unit, All the * input connections will then be called from this to have their * weights updated. * @param l The learning Rate to use. * @param m The momentum to use. */ public void updateWeights(double l, double m) { //the action the subclasses should perform is upto them //but if they coverride they should make a call to this to //call the method for all their inputs. if (!m_weightsUpdated) { for (int noa = 0; noa < m_numInputs; noa++) { m_inputList[noa].updateWeights(l, m); } m_weightsUpdated = true; } }
/** * Call this function to update the weight values at this unit. * After the weights have been updated at this unit, All the * input connections will then be called from this to have their * weights updated. * @param l The learning rate to use. * @param m The momentum to use. */ public void updateWeights(double l, double m) { if (!m_weightsUpdated && !Double.isNaN(m_unitError)) { m_methods.updateWeights(this, l, m); //note that the super call to update the inputs is done here and //not in the m_method updateWeights, because it is not deemed to be //required to update the weights at this node (while the error and output //value ao need to be recursively calculated) super.updateWeights(l, m); //to call all of the inputs. } }
/** * Call this function to update the weight values at this unit. * After the weights have been updated at this unit, All the * input connections will then be called from this to have their * weights updated. * @param l The learning rate to use. * @param m The momentum to use. */ public void updateWeights(double l, double m) { if (!m_weightsUpdated && !Double.isNaN(m_unitError)) { m_methods.updateWeights(this, l, m); //note that the super call to update the inputs is done here and //not in the m_method updateWeights, because it is not deemed to be //required to update the weights at this node (while the error and output //value ao need to be recursively calculated) super.updateWeights(l, m); //to call all of the inputs. } }