class_docstr: `Callback` that tracks the number of iterations done and properly sets training/eval mode
class_docstr_tok: ["`","Callback","`","that","tracks","the","number","of","iterations","done","and","properly","sets","training\/eval","mode"]
docstr: Set the model to validation mode
docstr_tok: ["Set","the","model","to","validation","mode"]
code: def before_validate(self):
      "Set the model to validation mode"
      self.model.eval()
      self.learn.training = False
  
imports: from __future__ import annotations
  from ..data.all import *
  from ..optimizer import *
  from ..losses import BaseLoss
label_desc: Use image node_id 5 for calling the TrainEvalCallback obj's underlying member method code with example usage: obj.before_validate() without return types