This tutorial is part of the didactic text: Learning Deep Learning, authored by Henrique Ferraz de Arruda, Alexandre Benatti, César Comin, and Luciano da Fontoura Costa.
The purpose of this tutorial is to provide simple didactic examples of deep learning architectures and problem solution. The codes included here are based on toy datasets, and restricted to parameters allowing short processing time. So, these codes are not suitable for other data and/or applications, which will require modifications in the structure and parameters. These codes have absolutely no warranty.
For all the codes presented here, we use Keras as the deep learning library. Keras is a useful and straightforward framework, which can be employed for simple and complex tasks. Keras is written in the Python language, providing self-explanatory codes, with the additional advantage of being executed under TensorFlow backend. We also employ the Scikit-learn, which is devoted to machine learning.
More details are available at Learning Deep Learning.
This is the first example of deep learning implementation, in which we address binary classification of wine data. In this example, we consider one feedforward network with 5 hidden layers and with 30 neurons in each layer. The provided networks were built only for a didactic purpose and are not appropriate for real applications.
In this example, we illustrate a multiclass classification through a wine dataset, in which there are three classes, which were defined according to their regions. We employed the same dataset presented above, but here we considered the three classes. To do so, we use the softmax activation function.
This tutorial is the second example of deep learning implementation, in which we exemplify a classification task. More specifically, we considered ten classes of colored pictures.
This is the third example of deep learning implementation. Here we use a LSTM network to predict the Bitcoin prices along time by using the input as a temporal series.
This is the fourth example of deep learning implementation. Here we use a RMB network to provide a recommendation system of musical instruments.
This example uses the Autoencoder model to illustrate a possible application. Here we show how to use the resulting codes to reduce the dimentionality. We also project our data by using a Principal Component Analysis(PCA).
This example was elaborated to create a network that can generate handwritten characters automatically.
All of these codes were developed and executed with the environment described in "libraries.txt".
If you publish a paper related to this material, please cite:
H. F. de Arruda, A. Benatti, C. H. Comin, L. da F. Costa, "Learning deep learning." Revista Brasileira de Ensino de Física 44, 2022.
Henrique F. de Arruda acknowledges FAPESP for sponsorship (grant no. 2018/10489-0). H. F. de Arruda also thanks Soremartec S.A. and Soremartec Italia, Ferrero Group, for partial financial support (from 1st July 2021). His funders had no role in study design, data collection, and analysis, decision to publish, or manuscript preparation. Alexandre Benatti thanks Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001. Luciano da F. Costa thanks CNPq (grant no. 307085/2018-0) and FAPESP (proc. 15/22308-2) for sponsorship. César H. Comin thanks FAPESP (Grant Nos. 2018/09125-4 and 2021/12354-8) for financial support. This work has been supported also by FAPESP grants 11/50761-2 and 15/22308-2.