使用 DCT 插值滤波器在 FPGA 上实现精确高效的 Hyperbolic Tangent 激活函数
神经与进化计算
2016-09-27 v1 机器学习
摘要
以低成本实现精确且快速的激活函数,是在 FPGA 上实现深度神经网络(DNN)的关键方面。我们提出了一种高精度近似方法,用于 DNN 中人工神经元的 Hyperbolic Tangent 激活函数。该方法基于离散余弦变换插值滤波器(DCTIF)。所提出的架构将存储的 Hyperbolic Tangent 函数样本与输入数据上的简单算术运算相结合。在相同或更少计算资源下,所提出的 DCTIF 实现比以往工作实现了高两个数量级的精度。可以选择 DCTIF 参数的各种组合,以在 Hyperbolic Tangent 函数的精度和复杂度之间进行权衡。在一种情况下,所提出的架构以 10E-5 的最大误差近似 Hyperbolic Tangent 激活函数,同时仅需 Virtex-7 FPGA 的 1.52 Kbits 内存和 57 个 LUT。我们还讨论了激活函数精度如何影响 DNN 在训练和测试精度方面的性能。我们表明,为了保持由精确函数实现的相同 DNN 训练和测试性能,高精度近似可能是必要的。
引用
@article{arxiv.1609.07750,
title = {Accurate and Efficient Hyperbolic Tangent Activation Function on FPGA using the DCT Interpolation Filter},
author = {Ahmed M. Abdelsalam and J. M. Pierre Langlois and F. Cheriet},
journal= {arXiv preprint arXiv:1609.07750},
year = {2016}
}
备注
8 pages, 6 figures, 5 tables, submitted for the 25th ACM/SIGDA International Symposium on Field-Programmable Gate Arrays (ISFPGA), 22-24 February 2017, California, USA