Optimization of CNN model for image classification