vol3: Added deep learning and needed code from vol2