论文标题
中小型矩阵的批处理特征分类
Batch-efficient EigenDecomposition for Small and Medium Matrices
论文作者
论文摘要
特征成分(ED)是许多计算机视觉算法和应用的核心。限制其使用情况的一种至关重要的瓶颈是昂贵的计算成本,尤其是对于深层神经网络中的小批量矩阵。在本文中,我们提出了一种基于QR的ED方法,该方法用于计算机视觉的应用程序方案。我们提出的方法通过批处理的矩阵/向量乘法完全执行ED,该矩阵乘法同时处理所有矩阵,从而充分利用GPU的功能。我们的技术是基于与双重威尔金森偏移的Givens旋转的明确QR迭代。通过几种加速技术,QR迭代的时间复杂性从$ o {(} n^5 {)} $减少到$ o {(} n^3 {)} $。数值测试表明,对于中小型批处理矩阵(\ emph {e.g。,} $ dim {<} 32 $),我们的方法比Pytorch SVD函数要快得多。视觉识别和图像产生的实验结果表明,我们的方法还达到了竞争性能。
EigenDecomposition (ED) is at the heart of many computer vision algorithms and applications. One crucial bottleneck limiting its usage is the expensive computation cost, particularly for a mini-batch of matrices in the deep neural networks. In this paper, we propose a QR-based ED method dedicated to the application scenarios of computer vision. Our proposed method performs the ED entirely by batched matrix/vector multiplication, which processes all the matrices simultaneously and thus fully utilizes the power of GPUs. Our technique is based on the explicit QR iterations by Givens rotation with double Wilkinson shifts. With several acceleration techniques, the time complexity of QR iterations is reduced from $O{(}n^5{)}$ to $O{(}n^3{)}$. The numerical test shows that for small and medium batched matrices (\emph{e.g.,} $dim{<}32$) our method can be much faster than the Pytorch SVD function. Experimental results on visual recognition and image generation demonstrate that our methods also achieve competitive performances.