本文整理汇总了C#中IActivationFunction.DerivativeFunction方法的典型用法代码示例。如果您正苦于以下问题:C# IActivationFunction.DerivativeFunction方法的具体用法?C# IActivationFunction.DerivativeFunction怎么用?C# IActivationFunction.DerivativeFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActivationFunction
的用法示例。
在下文中一共展示了IActivationFunction.DerivativeFunction方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateError
/// <inheritdoc />
public void CalculateError(IActivationFunction af, double[] b, double[] a,
double[] ideal, double[] actual, double[] error, double derivShift,
double significance)
{
for (var i = 0; i < actual.Length; i++)
{
var deriv = af.DerivativeFunction(b[i], a[i]) + derivShift;
error[i] = (ideal[i] - actual[i])*significance*deriv;
}
}
示例2: CalcDerivative
/// <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 CalcDerivative(IActivationFunction a, double d)
{
return a.DerivativeFunction(d);
}
示例3: 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];
}
示例4: xd3eb00c1c38e3a49
private static double xd3eb00c1c38e3a49(IActivationFunction x19218ffab70283ef, double x73f821c71fe1e676)
{
return x19218ffab70283ef.DerivativeFunction(x73f821c71fe1e676, x73f821c71fe1e676);
}
示例5: 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];
}