Added numberOfIterationsPerCostCalculation() function to BaseModel to reduce the amount of resources needed to update the model parameters.
For some reason, I accidentally added generateLayers() inside train() function for NeuralNetwork model. I have readded this.