⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sigmoidactivationfunction.cs

📁 AI : Neural Network for beginners
💻 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 + -