A hybrid training method based on deep learning for medical images classification