Capsule Network Implementation On FPGA
Abstract
A capsule neural network (CapsNet) is a new approach in artificial neural networks (ANN) that produces a better hierarchical relationship. The performance of CapsNet on a graphics processing unit (GPU) is considerably better than that of a convolutional neural network (CNN) at recognizing highly overlapping digits in images. Nevertheless, this new method has not been designed as an accelerator on a field programmable gate array (FPGA) to measure the speedup performance and compare it with the GPU. This paper aims to design the CapsNet module (accelerator) on FPGA. The performance between FPGA and GPU will be compared, mainly in terms of speedup and accuracy. The results show that training time on GPU using MATLAB is 789.091 s. Model evaluation accuracy is 99.79%, and the validation accuracy is 98.53%. The time required to finish one routing algorithm iteration in MATLAB is 0.043622 s, and in FPGA it takes 0.00065 s, which means the FPGA module is 67 times faster than the GPU.
Full text article
References
[1]-Y. LeCun, Y. Bengio, and G. Hinton, "Deep learning," nature, vol. 521, no. 7553, p. 436, 2015.
[2]-A. Muthuramalingam, S. Himavathi, and E. Srinivasan, "Neural network implementation using FPGA: issues and application," International journal of information technology, vol. 4, no. 2, pp. 86-92, 2008.
[3]-Y. Taright and M. Hubin, "FPGA implementation of a multilayer perceptron neural network using VHDL," in ICSP'98. 1998 Fourth International Conference on Signal Processing (Cat. No. 98TH8344), 1998, vol. 2, pp. 1311-1314: IEEE.
[4]-Z.-H. Li, J.-F. Jin, X.-G. Zhou, and Z.-H. Feng, "K-nearest neighbor algorithm implementation on FPGA using high level synthesis," in 2016 13th IEEE International Conference on Solid-State and Integrated Circuit Technology (ICSICT), 2016, pp. 600-602: IEEE.
[5]-R. Narayanan, D. Honbo, G. Memik, A. Choudhary, and J. Zambreno, "Interactive presentation: An FPGA implementation of decision tree classification," presented at the Proceedings of the conference on Design, automation and test in Europe, Nice, France, 2007.
[6]-S. Sabour, N. Frosst, and G. E. Hinton, "Dynamic routing between capsules," in Advances in neural information processing systems, 2017, pp. 3856-3866.
[7]-G. E. Hinton, S. Sabour, and N. Frosst, "Matrix capsules with EM routing," 2018.
[8]-A. Ahmad, B. Kakillioglu, and S. Velipasalar, "3D Capsule Networks for Object Classification from 3D Model Data," in 2018 52nd Asilomar Conference on Signals, Systems, and Computers, 2018, pp. 2225-2229: IEEE.
[9]-A. Shahroudnejad, P. Afshar, K. N. Plataniotis, and A. Mohammadi, "Improved explainability of capsule networks: Relevance path by agreement," in 2018 IEEE Global Conference on Signal and Information Processing (GlobalSIP), 2018, pp. 549-553: IEEE.
[10]-E. Nurvitadhiet al., "Can FPGAs beat GPUs in accelerating next-generation deep neural networks?," in Proceedings of the 2017 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, 2017, pp. 5-14: ACM.
[11]-L. Deng, "The mnist database of handwritten digit images for machine learning research
[best of the web]," IEEE Signal Processing Magazine, vol. 29, no. 6, pp. 141-142, 2012.
[12]-Y. Li and W. Chu, "A new non-restoring square root algorithm and its VLSI implementations," in Proceedings International Conference on Computer Design. VLSI in Computers and Processors, 1996, pp. 538-544: IEEE.
Authors

This work is licensed under a Creative Commons Attribution 4.0 International License.
In a brief statement, the rights relate to the publication and distribution of research published in the journal of the University of Sebha where authors who have published their articles in the journal of the university of Sebha should how they can use or distribute their articles. They reserve all their rights to the published works, such as (but not limited to) the following rights:
- Copyright and other property rights related to the article, such as patent rights.
- Research published in the journal of the University of Sebha and used in its future works, including lectures and books, the right to reproduce articles for their own purposes, and the right to self-archive their articles.
- The right to enter a separate article, or for a non-exclusive distribution of their article with an acknowledgment of its initial publication in the journal of Sebha University.
Privacy Statement The names and e-mail addresses entered on the Sabha University Journal site will be used for the aforementioned purposes only and for which they were used.