Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a NetGraph that returns the current NetEvalutionMode as 0 or 1
ResourceFunction["TrainingStateLayer"][] provides a NetGraph that returns the current NetEvalutionMode. |
Create the training state layer:
In[1]:= |
Out[1]= |
Simple output:
In[2]:= |
Out[2]= |
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
Use it as part of a network for data augmentation. This net adds noise as data augmentation during training:
In[5]:= |
Out[5]= |
Apply an input to the net, no noise is added:
In[6]:= |
Out[6]= |
When in training mode, noise is added each time the net is used:
In[7]:= |
Out[7]= |
Test mode does not add noise:
In[8]:= |
Out[8]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License