Acceleration of neural network training in image recognition and classification problems