Energy-Aware Deep Learning on Resource-Constrained Hardware