Detection and attribution of climate change: A deep learning and variational approach