||A particular concern for SDCs is the unavailability of domain- or coalition-wide controllers in the case of link unavailability and also during route convergence events. It is desirable for the routers to operate autonomously to maintain continuity even when connection to the controller(s) is lost. In this paper, we introduce a machine learning-based routing model as a step towards resilience. In this framework, flows or packets are routed according to an objective function through a learned model instead of a designed heuristic. To create this model, we propose two different strategies using Supervised Learning (SL) or Reinforcement Learning (RL) and for each, we explain how resilience can be achieved. Finally, we ran simulations to test our framework and show promising results both for SL and RL approaches.