How can I judge the model is train or validation in the ‘forward’ function?
In fact, I have construct a network, and write the ‘forward’ function. I want to judge whether this forward process happened in the training process or in the validation process.