Inference On Graphs: From Probability Methods To Deep Neural Networks