在频域进行网络推理,实现超100倍加速且精度损失极小。
Accelerating Inference of Networks in the Frequency Domain
- 提出频域推理链,仅需首尾各一次频域变换。
- 针对非线性层直接在频域操作,保持高效与准确。
- 适用于参数稀疏的网络,适合需要极致推理速度的场景。
已有研究证明,在频域中可显著压缩网络参数,同时保持较低精度损失。然而,由于频域变换开销大,整体计算复杂度并未明显降低。本文提出在频域中完成网络推理,以加速参数稀疏的网络。我们设计了与空间域推理对应的频域推理链,并针对非线性层提出直接在频域进行运算的策略,效果良好。该方法仅在推理开始和结束时各执行一次频域变换及其逆变换,无需每层都进行转换。与现有最优方法对比,本方法在超过100倍加速率下仍显著提升精度。代码已开源:https://github.com/guanfangdong/FreqNet-Infer。
原文摘要 · Abstract (English)
It has been demonstrated that networks' parameters can be significantly reduced in the frequency domain with a very small decrease in accuracy. However, given the cost of frequency transforms, the computational complexity is not significantly decreased. In this work, we propose performing network inference in the frequency domain to speed up networks whose frequency parameters are sparse. In particular, we propose a frequency inference chain that is dual to the network inference in the spatial domain. In order to handle the non-linear layers, we make a compromise to apply non-linear operations on frequency data directly, which works effectively. Enabled by the frequency inference chain and the strategy for non-linear layers, the proposed approach completes the entire inference in the frequency domain. Unlike previous approaches which require extra frequency or inverse transforms for all layers, the proposed approach only needs the frequency transform and its inverse once at the beginning and once at the end of a network. Comparisons with state-of-the-art methods demonstrate that the proposed approach significantly improves accuracy in the case of a high speedup ratio (over 100x). The source code is available at \url{https://github.com/guanfangdong/FreqNet-Infer}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。