// Draw --- public void Draw() { if (inNode == null || outNode == null) { return; } Vector3 oCenter = new Vector3(outNode.rect.x + outNode.rect.width, outNode.rect.y + outNode.rect.height / 2, 0); Vector3 iCenter = new Vector3(inNode.rect.x, inNode.rect.y + inNode.rect.height / 2, 0); Handles.DrawBezier( oCenter, iCenter, iCenter, oCenter, color, null, (ANNMathHelpers.Sigmoid(connection.weight) - 0.5f) * ANNProperties.GraphicWeightMultiplier ); }
// Sigmoid Activation - public static float SigmoidActivation(float value) { return(ANNMathHelpers.Sigmoid(value)); // A = sigmoid(x) }