Learned reconstruction methods for inverse problems: sample error estimates