added predict method for deep nets