Hardware Implementation of a Two-Layer Neural Network Based on FPGA: Analysis of the Efficiency of Using ReLU and LeakyReLU Activation Functions
https://doi.org/10.35596/1729-7648-2026-24-2-69-78
Abstract
Methods for the efficient hardware implementation of neural networks on FPGA-type programm able logic integrated circuits are investigated. A key aspect is the influence of the choice of activation functions on the characteristics of the developed device. An approach to the use of activation functions that allow for efficient hardware implementation is proposed. In particular, the use of LeakyReLU as a compromise between computational simplicity and classification accuracy is justified. To test the approach, a two-layer feedforward network architecture was developed, its hyperparameters were optimized, and hardware implementation was carried out on a PYNQ Z2 board. An analysis of the impact of the bit depth of the coefficients in fixed-point format on the re cognition accuracy of the MNIST database and on hardware costs is conducted. The optimal bit depth of the fractional part (9 bits) was experimentally determined, ensuring an accuracy of 95.27 % while economically using the resources of programmable logic integrated circuits. Additionally, using the Kullback – Leibler divergence, the distortion of the weight distribution during quantization was estimated, on the basis of which a regression model was constructed to predict the accuracy of a neural network with quantized coefficients.
About the Authors
O. SubbotenkoBelarus
Student
Minsk
M. Vashkevich
Belarus
Vashkevich Maxim, Dr. Sci. (Tech.), Professor at the Department of Embedded Computing System
220013, Minsk, P. Brovki St., 6
Tel.: +375 17 293-84-20
References
1. Ahmad M., Zhang L., Chowdhury M. E. H. (2024) FPGA implementation of Complex-Valued Neural Network for Polar-Represented Image Classification. Sensors. 24 (3).
2. Kwon J., Kim S. (2022) Design of a Low-Area Digit Recognition Accelerator Using MNIST Database. JOIV: International Journal on Informatics Visualization. 6 (1), 53–59.
3. Westby I., Yang X., Liu T., Xu H. (2021) FPGA Acceleration on a Multilayer Perceptron Neural Network for Digit Recognition. The Journal of Supercomputing. 77 (12), 14356–14373. https://doi.org/10.1007/s11227-021-03849-7.
4. Krivalсevich E. A., Vashkevich M. I. (2025) Investigation of Hardware Implementation of a Feedforward Neural Network for Handwritten Digit Recognition Based on FPGA. Doklady BGUIR. 23 (2), 101–108. http://dx.doi.org/10.35596/1729-7648-2025-23-2-101-108 (in Russian).
5. Subbotenko O. R., Vashkevich M. I. (2025) FPGA Implementation of a Two-Layer Direct Propagation Neural Network for Image Recognition. Information Technologies and Systems 2025 (ITS 2025): Proceedings of the Int. Conf., Minsk, Nov. 19. Minsk, Belarusian State University of Informatics and Radioelectronics. 153–154 (in Russian).
6. Maas A. L., Hannun A. Y., Ng A. Y. (2013) Rectifier Nonlinearities Improve Neural Network Acoustic Models. Proceedings of the 30th International Conference on Machine Learning (ICML). 1–6.
7. Subbotenko O. R. (2025) Development of a Hardware Module for Calculating the Argmax Function Based on FPGA. Faculty of Computer Systems and Networks: Proceedings of the 61st Scientific Conference of Graduate Students, Undergraduates and Students, Minsk, Apr. 22–26. Minsk, Belarusian State University of Informatics and Radioelectronics. 584–585.
Review
For citations:
Subbotenko O., Vashkevich M. Hardware Implementation of a Two-Layer Neural Network Based on FPGA: Analysis of the Efficiency of Using ReLU and LeakyReLU Activation Functions. Doklady BGUIR. 2026;24(2):69-78. (In Russ.) https://doi.org/10.35596/1729-7648-2026-24-2-69-78
JATS XML























