Artificial Intelligence on the Edge: From Learning to Deployment