Before running the model, we first have to determine the elements that we will use in
building a multilayer perceptron model, shown as follows:
- Architecture: The model contains 25 elements in the input layer because we have
25 features in the dataset. We have two elements in the output layer and we will
also use three hidden layers, although we could use any number of hidden
layers. We will use the same number of neurons in each layer, 200. Here we use
the powers of 2, which is an arbitrary choice.
- Activation function: We will choose the ELU activation function, which was
explained in the preceding chapter. - Optimizing algorithm: The optimization algorithm used here is the Adam
optimizer with a learning rate of 0.001. - Loss function: For the loss function, we will use the cross-entropy function.
- Weights initialization strategy: For this, we will use the Xavier initializer, a
method that comes as default with the fully_connected function from
TensorFlow. - Regularization strategy: We are not going to use any regularization strategy.
- Training strategy: We are going to use 40 epochs. So, we will present the dataset
40 times to the network, and in every iteration, we will use a batch size of 100.