Robust 2D And 3D Registration With Deep Neural Networks