Edge Computing with Early Exiting for Adaptive Inference in Mobile Autonomous Systems