使用分段非线性逼近算法计算超越函数,以神经网络中应用最为广泛的Sigmoid函数为例,结合函数自身对称的性质及其导数不均匀的特点提出合理的分段方法,给出分段方式同逼近多项式阶数对逼近结果精度的影响。完成算法在FPGA上的硬件实现,给出一种使用三阶多项式处理Sigmoid函数的拟合结果及流水线架构,处理精度达到10-5数量级,最大频率达到127.327 MHz,满足了高速、高精度的处理要求。
The piecewise non-linear approximation algorithm is a good way to deal with the calculation of some complex non-lin-ear functions.Combining the piecewise non-linear approximation algorithm with the properties of the Sigmoid function and its derivative function,propose to find the relationship between the segmentation strategy,order of the approximation polynomial and the computation precision.Experiments with FPGA show the better performance on speed and computation precision compared with some other algorithms.