Recurrent Neural Network¶
This is a use case of DEATF where a RNN is used.
This is a classification problem with the fasion MNIST dataset. In this case a RNN is used to procces that data and those images are passed as sequences and with those the RNN has to return and predict the class of each image.
-
rnn.eval_rnn(nets, train_inputs, train_outputs, batch_size, iters, test_inputs, test_outputs, hypers)¶ The model is created with one RNN, but it needs a dense layer with a softmax activation function. That is needed because they are probability distributions and they have to be between 0 and 1. Finally accuracy error is used to measuare the performance of the model.
- Parameters
nets – Dictionary with the networks that will be used to build the final network and that represent the individuals to be evaluated in the genetic algorithm.
train_inputs – Input data for training, this data will only be used to give it to the created networks and train them.
train_outputs – Output data for training, it will be used to compare the returned values by the networks and see their performance.
batch_size – Number of samples per batch are used during training process.
iters – Number of iterations that each network will be trained.
test_inputs – Input data for testing, this data will only be used to give it to the created networks and test them. It can not be used during training in order to get a real feedback.
test_outputs – Output data for testing, it will be used to compare the returned values by the networks and see their real performance.
hypers – Hyperparameters that are being evolved and used in the process.
- Returns
Accuracy error obtained with the test data that evaluates the true performance of the network.