Complexity-aware Adaptive Training and Inference for Edge-Cloud Distributed AI Systems | Synapse