Combination of supervised and unsupervised learning for training the activation functions of neural networks