The documentation is doing something slightly confusing. It is reassigning to the value "lenet".
Try the following. Rename "lenet" to "trainedlenet" after it has been trained. You will want to re-run everything from the top after doing this:
lenet = NetChain[{ConvolutionLayer[20, 5], Ramp, PoolingLayer[2, 2],
ConvolutionLayer[50, 5], Ramp, PoolingLayer[2, 2], FlattenLayer[],
500, Ramp, 10, SoftmaxLayer[]},
"Output" -> NetDecoder[{"Class", Range[0, 9]}],
"Input" -> NetEncoder[{"Image", {28, 28}, "Grayscale"}]];
trainedlenet = NetTrain[lenet, trainingData, ValidationSet -> testData,
MaxTrainingRounds -> 3, TargetDevice -> "GPU"]
This way you can be sure to not get them mixed up.