private void UpdateHiddens() { double input = 0; double[] states = visibles.GetStates(); for (int i = 0; i < numhiddens; i++) { for (int j = 0; j < numvisibles; j++) { input += weights.GetWeight(j, i) * states[j]; } hiddens.SetState(i, input); input = 0; } }
private static void TrainWeight(int PWhichVis, int PWhichHid, double PTrainAmount) { weightset.ModifyWeight(PWhichVis, PWhichHid, (learnrate.momweights * weightset.GetWeightChange(PWhichVis, PWhichHid)) + (learnrate.lrweights * PTrainAmount) - (0.0002 * weightset.GetWeight(PWhichVis, PWhichHid))); }