public void getError(float[] expected_output) { for (int i = 0; i < error.Length; i++) { error[i] = (expected_output[i] - output[i]) * ActFuncs.f_act_deriv(non_activated_stages[i]); } }
public void getError(float[] sigma_next_layer, float[,] weights_next_layer) {//W transp*sigma_next_layer*f_derived(ul) float part_summ_error; for (int p = 0; p < outputs_number; p++) { part_summ_error = 0; for (int q = 0; q < next_layer_outputs_number; q++) { part_summ_error += sigma_next_layer[q] * weights_next_layer[p, q]; } errors[p] = part_summ_error * ActFuncs.f_act_deriv(non_activated_stages[p]); } }