基于二阶近似和误差补偿的Tanh函数硬件实现  被引量:5

Hardware Implementation of Tanh Function Based on Second-Order Approximation and Error Compensation

在线阅读下载全文

作  者:张博文 陈刚[1] 陈旭[1] 鲁华祥[1,2,3,4] ZHANG Bowen;CHEN Gang;CHEN Xu;LU Huaxiang(Institute of Semicond.,Chinese Academy of Sci.,Beijing 100083 P.R.China;Univ.of Chinese Academy of Sci.,Beijing 100089,P.R.China;Center for Excellence in Brain Sci.and Intellig.Technol.,Chinese Academy of Sci.,Shanghai 200031,P.R.China;Semicond.Neural Network Intellig.Perception and Comput.Technol.Beijing Key Lab,Beijing 100083,P.R.China)

机构地区:[1]中国科学院半导体研究所,北京100083 [2]中国科学院大学,北京100089 [3]中国科学院脑科学与智能技术卓越创新中心,上海200031 [4]半导体神经网络智能感知与计算技术北京市重点实验室,北京100083

出  处:《微电子学》2021年第6期905-909,共5页Microelectronics

基  金:国家自然科学基金资助项目(U19A2080,U1936106);中科院先导专项(XDA27040303,XDA18040400,XDB44000000);中科院高技术项目(31513070501,1916312ZD00902201)。

摘  要:为改善目前激活函数Tanh硬件化时资源消耗大,精度低的问题,提出了一种二阶近似和误差补偿相结合的Tanh函数近似算法。该方法首先对传统二阶近似函数的系数进行log;变换,以便于硬件实现。然后根据近似函数的误差曲线,划分补偿区间,以提高函数精度。在此基础上设计了可硬件实现Tanh函数的电路结构,在ModelSim平台下进行功能仿真,并在SMIC 0.18μm工艺下进行逻辑综合。实验结果表明,所实现电路的最大绝对误差为0.007 8,是8 bit输出位宽所能表示的最高精度。In order to solve the problem of high resource consumption and low precision in the hardware implementation of the activation function Tanh, a Tanh function approximation algorithm combining second-order approximation and error compensation was proposed. This method first performed log;transformation on the traditional second-order approximation function’s coefficients, which was convenient for hardware implementation and reduced the resource consumption. Then the compensation interval was divided according to the approximate function’s error curve to improve the function’s accuracy. On this basis, the circuit structure of the hardware implementation of the Tanh function was designed. The ModelSim platform was used for functional simulation, and the logic synthesis was performed under the SMIC 0.18 μm process. Experimental results showed that the implemented circuit’s maximum absolute error was 0.007 8, which was the highest accuracy that the 8 bit output width could represent.

关 键 词:Tanh函数 二阶近似 硬件实现 人工神经网络 

分 类 号:TN492[电子电信—微电子学与固体电子学]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象