西安电子科技大学学报 ›› 2020, Vol. 47 ›› Issue (3): 58-65.doi: 10.19665/j.issn1001-2400.2020.03.008

• • 上一篇    下一篇

Sigmoid函数的低复杂度概率分段线性拟合法

NGUYEN Van-Truong,蔡觉平,魏琳育,褚洁   

  1. 西安电子科技大学 微电子学院,陕西 西安 710071
  • 收稿日期:2019-11-08 出版日期:2020-06-20 发布日期:2020-06-19
  • 作者简介:NGUYEN Van-Truong(1990—),男,西安电子科技大学博士研究生,E-mail: nguyentruong. xian@gmail.com
  • 基金资助:
    芜湖-西电产学研合作专项资金(012019005);国际科技创新战略合作重点项目(2016YFE0207000)

Low complexity probability-based piecewise linear approximation of the sigmoid function

NGUYEN Van-Truong,CAI Jueping,WEI Linyu,CHU Jie   

  1. School of Microelectronics, Xidian University, Xi’an 710071, China
  • Received:2019-11-08 Online:2020-06-20 Published:2020-06-19

摘要:

针对传统的Sigmoid激活函数拟合方法准确度不高、消耗大量资源等问题,提出了一种基于各层神经元值分布概率的Sigmoid函数分段线性拟合方法,以便在仅使用加法电路的情况下,提高神经网络的识别精度。首先以Sigmoid函数的二阶导数为基础,将Sigmoid函数划分为3个固定区域;其次根据每层神经元值的概率变化,将每个固定区域的曲线再划分成不同数量、长度的子区域,以减少近似误差, 提高识别精度。分段线性函数斜率设为2 - n,有效地降低了Sigmoid函数的硬件实现复杂度。最后,设计了拟合函数的硬件电路结构,并在Xilinx FPGA-XC7A200T上实现MNIST手写数字识别,对所提出的拟合方法进行验证。实验结果表明,该方法的识别准确率在深度神经网络中约达到97.45%,而在卷积神经网络中约达到98.42%。与其他仅使用加法电路的拟合方法对比,准确率分别提高了约0.84%和0.57%。

关键词: Sigmoid函数, 概率, 神经网络, 分段线性拟合, 现场可编程门阵列

Abstract:

In order to improve the network recognition accuracy in the low complexity condition, a piecewise linear sigmoid function approximation based on the distribution probability of the neurons’ values is proposed only with one addition circuit. The sigmoid function is first divided into three fixed regions. Second, according to the neurons’ values distribution probability, the curve in each region is segmented into sub-regions to reduce the approximation error and improve the recognition accuracy. The slope of the piecewise linear function is set as 2-n, effectively reducing the hardware implementation complexity. Experiments performed on Xilinx’s FPGA-XC7A200T implement the MNIST handwritten digits recognition. The results show that the proposed method achieves a 97.45% recognition accuracy in a deep neural network and 98.42% in a convolutional neural network, up to 0.84% and 0.57% higher than other approximation methods only with one addition circuit.

Key words: Sigmoid function, probability, neural networks, piecewise linear approximation, field programmable gate array

中图分类号: 

  • TN402