created separate file for training models, included boolean for updating the denoising standard deviation