Neuromorphic Devices Assisted by Machine Learning Algorithms