Neurostream: Scalable and Energy Efficient Deep Learning with Smart Memory Cubes