DOI QR코드

DOI QR Code

이진 가중치 신경망의 하드웨어 구현을 위한 고정소수점 연산 정확도 분석

Accuracy Analysis of Fixed Point Arithmetic for Hardware Implementation of Binary Weight Network

  • Kim, Jong-Hyun (Department of Computer and Telecomm. Engineering, Yonsei University) ;
  • Yun, SangKyun (Department of Computer and Telecomm. Engineering, Yonsei University)
  • 투고 : 2018.09.08
  • 심사 : 2018.09.19
  • 발행 : 2018.09.30

초록

본 연구에서는 이진 가중치 신경망(BWN)을 부동소수점 데이터를 사용하여 학습시킨 후에, 학습된 파라미터와 주요연산을 고정소수점으로 근사화시키는 과정에서 정확도의 변화를 분석하였다. 신경망을 이루고 있는 각 계층의 입력 데이터와 컨볼루션 연산의 계산에 고정소수점 수를 사용했으며, 이때 고정소수점 수의 전체 bit 수와 소수점 이하 bit 수에 변화를 주면서 정확도 변화를 관찰하였다. 각 계층의 입력 값과 중간 계산값의 정수 부분의 손실이 발생하지 않으면 고정소수점 연산을 사용해도 부동소수점 연산에 비해 큰 정확도 감소가 없었다. 그리고 오버플로가 발생하는 경우에 고정소수점 수의 최대 또는 최소값으로 근사시켜서 정확도 감소를 줄일 수 있었다. 이 연구결과는 FPGA 기반의 BWN 가속기를 구현할 때에 필요한 메모리와 하드웨어 요구량을 줄이는 데 사용될 수 있다.

In this paper, we analyze the change of accuracy when fixed point arithmetic is used instead of floating point arithmetic in binary weight network(BWN). We observed the change of accuracy by varying total bit size and fraction bit size. If the integer part is not changed after fixed point approximation, there is no significant decrease in accuracy compared to the floating-point operation. When overflow occurs in the integer part, the approximation to the maximum or minimum of the fixed point representation minimizes the decrease in accuracy. The results of this paper can be applied to the minimization of memory and hardware resource requirement in the implementation of FPGA-based BWN accelerator.

키워드

참고문헌

  1. A. Krizhevsky, I. Sutskeve, and G.E. Hinton, "Imagenet classification with deep convolutional neural networks," Advances in neural information processing systems, pp. 1097-1105, 2012. DOI:10.1145/3065386
  2. K. Simonyan, and A. Zisserman, "Very deep convolutional networks for large-scale image recognition," arXiv preprint arXiv:1409.1556, 2014.
  3. D. D. Lin and S. S. Talathi, "Overcoming challenges in fixed point training of deep convolutional networks," arXiv preprint arXiv: 1607.02241, 2016.
  4. D. Miyashita, E.H. Lee, and B. Murmann, "Convolutional neural networks using logarithmic data representation," arXiv preprint arXiv: 1603.01025, 2016.
  5. M. Courbariaux, et al., "Binarized neural networks: Training deep neural networks with weights and activations constrained to +1 or -1," arXiv preprint arXiv:1602.02830, 2016.
  6. M. Rastegari, et al., "XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks," in European Conf. on Computer Vision (ECVV'16), Springer, pp. 525-542, 2016.
  7. R. Zhao, W. Song. "Accelerating binarized convolutional neural networks with software programmable FPGAs," in Proc. ACM/SIGDA Int. Symp. on Field-Programmable Gate Arrays, ACM, pp. 15-24, 2017.DOI;10.1145/3020078.3021741
  8. Y. Umuroglu, et al., "FINN: a framework for fast, scalable binarized neural network inference," in Proc. ACM/SIGDA Int. Symp. on Field-Programmable Gate Arrays, ACM, pp. 65-74, 2017. DOI:10.1145/3020078.3021744
  9. S. Liang, et al., "FP-BNN: Binarized Neural Network on FPGA," Neurocomputing 275, pp. 1072-1086, 2018. DOI:10.1016/j.neucom.2017.09.046
  10. R. Andri, et al. "YodaNN: An ultra-low power convolutional neural network accelerator based on binary weights," IEEE Computer Society Annual Symp. on VLSI (ISVLSI'16), pp. 236-241, 2016. DOI:10.1109/ISVLSI.2016.111
  11. CIFAR-10 and CIFAR-100 datasets, https://www.cs.toronto.edu/-kriz/cifar.html

피인용 문헌

  1. 한정된 자원을 갖는 FPGA에서의 이진가중치 신경망 가속처리 구조 설계 및 구현 vol.24, pp.1, 2020, https://doi.org/10.7471/ikeee.2020.24.1.225