High-performance and energy-efficient deep learning for resource-constrained devices