The denoising of 2D images through low-rank methods is a relevant topic in digital image processing. This paper proposes a novel method that trains a learning network to predict the optimal thresholds of the singular value decomposition involved in the low-rank denoising of 2D images. To improve the denoising results, we apply the block-matching algorithm and classify each 3D block according to four parameters, which increase the specificity of the network for the prediction of the thresholds. Our method outperforms state-of-the-art methods for image denoising; furthermore, it is general with respect to the type of noise and provides an upper bound to the accuracy of the denoising of 2D images through the Singular Value Decomposition.