Learning Runtime Decisions for Adaptive Real-Time Perception