{'fraction_non_alphanumeric': 0.015803336259877086, 'fraction_numerical': 0.006145741878841089, 'mean_word_length': 5.368715083798882, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Efficient FPGA Implementation of softmax Layer in Deep Neural Network

Deep neural network (DNN) is an important technology in the field of artificial intelligence. The softmax layer is one of the key component layers for completing multi-classifcation tasks. The softmax layer contains a large number of exponents and division operations, which causes it to consume a lot of hardware resources in FPGA implementation. This paper presents an efficient FPGA implementation of the softmax layer. For the exponential operation of the softmax layer, the mathematical transformation better than the Coordinate Rotation Digital Computer (CORDIC) algorithm is used to convert to subtraction and 2 exponential operation. The division is converted into a subtraction and shift operation, and added the highest non-zero bit detection processing before the operation to greatly reduce the cycle of the division operation. Experimenting with our softmax architecture on Xilinx ZCU102, the results show that the FPGA implementation of softmax layer can attain the precision of magnitude 10-6 and greatly accelerate the calculation of the softmax layer.