Hi,
"preprocessedValidationData" is generated by the preprocessData function call on data and inputSize
preprocessedTrainingData = transform(augmentedTrainingData,@(data)preprocessData(data,inputSize));
preprocessedValidationData = transform(validationData,@(data)preprocessData(data,inputSize));
preprocessData is a supporting function that is defined above the references section in the doc page. So it has to be made sure that the supporting functions are defined in the same script so that the validation data can be generated properly.
Hope this helps!