TCCgrad
Treinamento de redes neurais com arquitetura multilayer perceptron em FPGA
Fecha
2019-07-22Autor
Souza, Henrique Alfredo de
Institución
Resumen
Este trabalho de conclusão de curso apresenta uma implementação em Field Programmable Gate Arrays (FPGA) de um sistema responsável pelo treinamento on chip de redes neurais com arquitetura
Multilayer Perceptron (MLP). O treinamento utilizado é o Mini-Batch
Stochastic Gradient Descent (MBSGD) com aceleração de convergência por momento. O estudo das redes e do treinamento foi realizado
inicialmente em Python com auxílio da biblioteca de aprendizado de
máquina Scikit-learn. Posteriormente em MatLab gerou-se as rotinas
responsáveis pela implementação do treinamento com uso de aritmética
de ponto fixo de modo a facilitar a tradução para uma Hardware Description Language (HDL). Na sequência implementou-se o treinamento
na HDL Verilog considerando uma rede com topologia fixa, função de
ativação Rectified Linear Unit (ReLU) e função custo Mean Squared
Error (MSE). Os resultados obtidos com Python são comparados com
os de MatLab verificando congruência, não podendo entretanto serem
iguais devido à perda inerente da quantização dos cálculos com ponto
fixo. Posteriormente o sistema implementado em Verilog é simulado
no software ModelSim e os resultados comparados com os de MatLab
cujos valores devem ser similares, validando assim o trabalho realizado. This course conclusion paper presents an implementation on an
FPGA of a system responsible for the on chip training of neural networks
with MultiLayer Perceptron architecture. The adopted method for training is the Mini Batch Stochastic Gradient Descent acelerating convergence with momentum. The study of the networks and the training
methods was carried out initially in Python with the aid of the machine
learning library Scikit-learn. Subsequently in MatLab the routines responsible for the training were generated with fixed-point arithmetic in
order to facilitate the translation to a Hardware Description Language
(HDL). In the next stage, the training on the HDL Verilog was implemented considering a fixed topology, activation function Rectified Linear Unit (ReLU) and cost function as the Mean Squared Error (MSE).
The results obtained with Python are compared with those of MatLab
checking for congruence as the results can’t be equals due to inerent
loss from quantization using fixed-point calculations. Afterwards the
system implemented in Verilog is simulated in the ModelSim software
and the results compared to those of MatLab whose values must be
similar, thus validating the work done.