本文整理汇总了C#中IActivationFunction.ActivationFunction方法的典型用法代码示例。如果您正苦于以下问题:C# IActivationFunction.ActivationFunction方法的具体用法?C# IActivationFunction.ActivationFunction怎么用?C# IActivationFunction.ActivationFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActivationFunction
的用法示例。
在下文中一共展示了IActivationFunction.ActivationFunction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalcDerivative2
/// <summary>
/// Calculate the derivative.
/// </summary>
/// <param name="a">The activation function.</param>
/// <param name="d">The value to calculate for.</param>
/// <returns>The derivative.</returns>
private double CalcDerivative2(IActivationFunction a, double d)
{
double[] temp = new double[1];
temp[0] = d;
a.ActivationFunction(temp, 0, 1);
a.ActivationFunction(temp, 0, 1);
return temp[0];
}
示例2: xbc17cb206c45d25e
private static double xbc17cb206c45d25e(IActivationFunction x19218ffab70283ef, double x73f821c71fe1e676)
{
double[] d = new double[] { x73f821c71fe1e676 };
x19218ffab70283ef.ActivationFunction(d, 0, d.Length);
d[0] = x19218ffab70283ef.DerivativeFunction(d[0], d[0]);
return d[0];
}
示例3: CalculateRange
/// <summary>
/// Calculate the range of an activation function.
/// </summary>
/// <param name="af">The actionvation function to calculate for.</param>
/// <param name="r">The value to collect the range at.</param>
/// <returns>The range.</returns>
private double CalculateRange(IActivationFunction af, double r)
{
double[] d = { r };
af.ActivationFunction(d, 0, 1);
return d[0];
}
示例4: CalcDerivative2
/// <summary>
/// Calculate the derivative.
/// </summary>
///
/// <param name="a">The activation function.</param>
/// <param name="d">The value to calculate for.</param>
/// <returns>The derivative.</returns>
private static double CalcDerivative2(IActivationFunction a, double d)
{
var temp = new double[1];
temp[0] = d;
a.ActivationFunction(temp, 0, temp.Length);
temp[0] = a.DerivativeFunction(temp[0],temp[0]);
return temp[0];
}