Federated Learning for Inference at Anytime and Anywhere