浅析基于FPGA的Mish函数实现

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
TECHNOLOGY AND INFORMATION
IT技术论坛
浅析基于FPGA的Mish函数实现
肖祥位1 蔡敬菊*2 (通讯作者) 徐智勇3 1. 中国科学院光电技术研究所国家光束控制重点实验室 四川 成都 610209; 2. 中国科学院光电技术研究所 四川 成都 610209; 3. 中国科学院大学 北京 100049
引言
随着计算机处理能力的提高,神经网络再次成为人工智能 领域的研究热点。目前主流的方式仍然是基于CPU/GPU对算法 进行实现,但由于神经网络算法具有庞大的计算量,使得在传 统平台上实现存在实时性不强、功耗过高、体积较大等缺陷, 极大地限制了神经网络算法的落地应用。因此目前该方向的理 论研究和实际应用方面存在着较大的脱节。现场可编程门阵列 (FPGA)可以通过硬件描述语言对电路进行描述,可以构建大型 电路实现并行计算。使用FPGA实现AI算法,极大地加快了计 算速度,提高实时性,降低系统功耗。为AI算法落地提供强有 力的支撑。
Implementation of Mish function based on FPGA
Xiao Xiangwei1, Cai Jingju*2(Corresponding , autho) Xu Zhiyong3 1.National 863 Program Key Laboratory of Beam Control, Institute of Optoelectronics Technology, Chinese Academy of Sciences, Chengdu 610209, Sichuan; 2. Institute of Optoelectronics Technology, Chinese Academy of Sciences, Chengdu 610209, Sichuan; 3. University of Chinese Academy of Sciences, Beijing 100049 Abstract Using FPGA to accelerate AI algorithms is currently a popular direction. Among them, the Mish function is an important calculation link in YOLOv4 and its derivative networks. Because of its non-monotonicity and nonlinearity, it greatly improves the network accuracy in the entire network. Therefore, if you want to use FPGA to accelerate YOLOv4 and its derivative networks, you must implement this function on FPGA. Since the Mish function involves exponential function, logarithmic function, and tangent function calculation, its direct implementation on hardware consumes a lot of logic resources and is very difficult to implement. There is no relevant research work to implement this function on FPGA. This article briefly introduces the characteristics of Mish function, and analyzes the realization based on FPGA. It compares several ways to implement Mish function, and finally implements it in the form of piecewise fitting.The results show that this implementation method can control the error to a small order of magnitude and has no effect on the output of the overall YOLOv4 network. It has certain reference significance for using FPGA to accelerate YOLOv4 and its derivative networks. Key words YOLOv4; FPGA; Mish function; Piecewise fitting
Mish函数是YOLOv4及其衍生版本里面用得较多的一个激 活函数,是整个网络中实现非线性运算的关键。Mish函数的使 用使得整个网络检测效果得到了很大程度的提升,它的非单调 平滑性相比于其他激活函数有着更好的表现。想使用FPGA对 YOLOv4及其衍生网络加速则不可避免地要在FPGA上实现Mish 函数。本文首先对Mish函数进行介绍,提出几种不同的实现方 案,通过对不同方案的对比分析,最终确定以多在较小的范围,为使用FPGA加速YOLOv4及其衍生网络奠
摘 要 使用FPGA加速AI算法是目前比较热门的方向。其中Mish函数是YOLOv4以及其衍生网络中的重要计算环 节,因其非单调性、非线性在整个网络中极大地提高了网络精度。因此想利用FPGA加速YOLOv4及其衍生网络就必 须在FPGA上实现该函数。由于Mish函数涉及指数函数、对数函数、正切函数计算,所以在硬件上直接实现会消耗 大量逻辑资源而且实现非常困难。目前还没有相关研究工作在FPGA上实现该函数,文章简要介绍了Mish函数的特 性,并基于FPGA进行实现分析,比较了几种实现Mish函数的方式,最终采用分段拟合的形式进行实现。结果表明 该实现方式可以将误差控制在很小的数量级,对整体YOLOv4网络的输出没有影响。对使用FPGA加速YOLOv4及其 衍生网络有一定的参考意义。 关键词 YOLOv4;FPGA;Mish函数;分段拟合
相关文档
最新文档