Deep learning algorithms have been widely used to solve linear Kolmogorov partial differential equations (PDEs) in high dimensions, where the loss function is defined as a mathematical expectation. We propose to use the randomized quasi-Monte Carlo (RQMC) method instead of the Monte Carlo (MC) method for computing the loss function. In theory, we decompose the error from empirical risk minimization (ERM) into the generalization error and the approximation error. Notably, the approximation error is independent of the sampling methods. We prove that the convergence order of the mean generalization error for the RQMC method is O(n−1+ϵ) for arbitrarily small ϵ>0, while for the MC method it is O(n−1/2+ϵ) for arbitrarily small ϵ>0. Consequently, we find that the overall error for the RQMC method is asymptotically smaller than that for the MC method as n increases. Our numerical experiments show that the algorithm based on the RQMC method consistently achieves smaller relative L2 error than that based on the MC method.