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 training mode
docstr_tok: ["Set","the","model","to","training","mode"]
code: def before_train(self):
      "Set the model to training mode"
      self.learn.pct_train = self.epoch / self.n_epoch
      self.model.train()
      self.learn.training = True
  
imports: from __future__ import annotations
  from ..data.all import *
  from ..optimizer import *
  from ..losses import BaseLoss
label_desc: Use image node_id 4 for calling the TrainEvalCallback obj's underlying member method code with example usage: obj.before_train() without return types