Standard deep learning algorithms are implemented using floating-point real numbers. This presents an obstacle for implementing them on low-end devices which may not have dedicated floating-point units (FPUs). As a result, researchers in tinyML have considered machine learning algorithms that can train and run a deep neural network (DNN) on a low-end device using integer operations only. In this paper we propose PocketNN, a light and self-contained proof-of-concept framework in pure C++ for the training and inference of DNNs using only integers. Unlike other approaches, PocketNN directly operates on integers without requiring any explicit quantization algorithms or customized fixed-point formats. This was made possible by pocket activations, which are a family of activation functions devised for integer-only DNNs, and an emerging DNN training algorithm called direct feedback alignment (DFA). Unlike the standard backpropagation (BP), DFA trains each layer independently, thus avoiding integer overflow which is a key problem when using BP with integer-only operations. We used PocketNN to train some DNNs on two well-known datasets, MNIST and Fashion-MNIST. Our experiments show that the DNNs trained with our PocketNN achieved 96.98% and 87.7% accuracies on MNIST and Fashion-MNIST datasets, respectively. The accuracies are very close to the equivalent DNNs trained using BP with floating-point real number operations, such that accuracy degradations were just 1.02%p and 2.09%p, respectively. Finally, our PocketNN has high compatibility and portability for low-end devices as it is open source and implemented in pure C++ without any dependencies.
翻译:标准深层次学习算法使用浮动点真实数字来实施。 这是在低端设备上实施这些算法的障碍, 这些低端设备可能没有专门的浮点单位( FPUs ) 。 因此, 小ML的研究人员已经考虑过机器学习算法, 这些算法可以只使用整数操作来培训和运行一个低端设备上的深层神经网络( DNN ) 。 在本文中, 我们建议使用纯 C++ 来培训和推断 DNNP 的光和自足的概念校验框架, 仅使用整数。 与其他方法不同, PocketNNNND直接在整数上运行, 不需要任何明确的浮点数算算算法或定制的固定点格式。 之所以能够做到这一点,是因为小MNP(DNP) 的激活功能是: 用于整数只 DNFNP的启动功能, 与我们经过训练的DNIS 数据源( BNM) 高, 使用完全的DNF- NIS 和 工具( ) 都显示我们经过训练的D- NISP) 的精明的D- ND- PD- PD- PD- P- P- P- m- m- m- s- m- s- s- sl) 数据源( 高) 。