📄 sigmoidactivationfunction.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace GA_ANN_XOR
{
#region SigmoidActivationFunction CLASS
/// <summary>
/// Provides a sigmoid activation function
/// </summary>
public class SigmoidActivationFunction
{
/// <summary>
/// Takes a value for a current network node, and applies a sigmoid
/// activation function to it, which is then returned
/// </summary>
/// <param name="x">The value to apply the activation to</param>
/// <returns>The activation value, after a sigmoid function</returns>
public static double processValue(double x)
{
return 1.0 / (1.0 + Math.Pow(Math.E, -x));
}
}
#endregion
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -