public void Backward(float label) { a.gradient = 0.0f; b.gradient = 0.0f; c.gradient = 0.0f; var pull = 0.0f; if (label == 1.0f && unit_out.value < 1.0f) { pull = 1.0f; } if (label == -1.0f && unit_out.value > -1.0f) { pull = -1.0f; } circuit.Backward(pull); a.gradient += -a.value; b.gradient += -b.value; }