Utilizing some undocumented Mathematica functionality, I implemented it like this:

noisyLayer = NetGraph[
    NeuralNetworks`RandomElementwiseLayer[NormalDistribution[0, 0.1] &],
   {{NetPort["Input"], 1} -> 2}

I use it as a softer replacement for DropoutLayer, and a slightly more complex variant of it for image augmentation by randomly adjusting brightness, contrast and gamma. The only problem is that (as expected) NetTrain would compute validation errors with noise on, so to see my neural net's performance on unaugmented validation data, I have to stop training, manually NetDelete the layer and call NetMeasurements on the half-trained network. I would rather like to see validation errors nicely plotted in real-time, just like they would be if I used built-in layers like DropoutLayer or ImageAugmentationLayer. Is this possible?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.