{'fraction_non_alphanumeric': 0.016722408026755852, 'fraction_numerical': 0.0008361204013377926, 'mean_word_length': 5.367021276595745, '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}}
A specification that supports FPGA devices on the TensorFlow framework

With the rise of artificial intelligence and machine learning, many applications and services require FPGA support to speed up the training process and improve efficiency. FPGA has its unique advantages including inference; but now TensorFlow only supports CPU and GPU, TPU, does not support FPGA, cannot use FPGA to accelerate specific models, and cannot play the full role of FPGA in TensorFlow. Based on the above problems, this paper proposes a method for efficiently using FPGA in TensorFlow. This method uses TensorFlow's original device management mechanism, adds an abstract method for FPGA devices under the TensorFlow framework, and writes implementation specifications for FPGA operators. Finally, we used OpenCL to build kernels of FPGA devices, took full advantage of the parallel computing advantages of FPGA devices, and used the CNN LeNet5 model and MNIST dataset to conduct corresponding experiments. The experimental results show that the training accuracy of the two devices is basically the same. This paper provides a feasible solution for TensorFlow to use FPGA devices for neural network calculations.