Deep learning lattice gauge theories