Leveraging Deep Learning For Robust Visual And Visual-Inertial Slam