摘要
双曲正切函数(Tanh)在神经网络中经常被用作激活函数,而其非线性的特点导致难以用硬件电路直接计算实现.为了快速有效的实现Tanh函数,提出采用DCORDIC(Differential Coordinate Rotation Digital Computer)算法在不同模式下实现双曲正弦、双曲余弦函数和除法运算,并在设计中增加选择模块扩大输入数据的范围,最终设计实现的Tanh计算核具有超长流水线,当迭代次数为13时,计算误差在2-8以内.与现有的硬件实现方式相比,本文的实现方式具有更小的误差、更高的运算速度和更大的吞吐率.
Hyperbolic tangent function(Tanh)is often used as an activation function in neural networks,but its non-linear character makes it difficult to be realized by hardware circuit directly.In order to implement the Tanh function quickly and efficiently,the DCORDIC(Differential Coordinate Rotation Digital Computer)algorithm is proposed to implement the hyperbolic sine/cosine function and division operation in different modes,and a selection module is added to expand the range of input data.The final design implementation of the tanh computation core has a very long pipeline with a computational error of 2-8.Compared with the existing hardware implementation methods,the proposed implementation method has smaller error,higher computing speed and greater throughput.
作者
吴绮
金楚丰
陈刚
鲁华祥
陈旭
WU Qi;JIN Chu-feng;CHEN Gang;Lu Hua-xiang;CHEN Xu(Institute of Semiconductors,Chinese Academy of Science,Beijing 100083,China;University of Chinese Academy of Sciences,Beijing 100089,China;University of Electronic Science and Technology of China,Chengdu 610054,China;Center for Excellence in Brain Science and Intelligence Technology,Chinese Academy of Science,Shanghai 200031,China;Semiconductor Neural Network Intelligent Perception and Computing Technology Beijing Key Lab,Beijing 100083,China)
出处
《微电子学与计算机》
北大核心
2020年第12期22-26,32,共6页
Microelectronics & Computer
基金
国家自然科学基金项目(61701473)
中国科学院战略性先导科技专项(XDA18000000)。