Accelerating lattice quantum Monte Carlo simulations using artificial neural networks: Application to the Holstein model