Scala based Deep Learning Algorithm