class_docstr: `Callback` that returns all predictions and targets, optionally `with_input` or `with_loss`
class_docstr_tok: ["`","Callback","`","that","returns","all","predictions","and","targets",",","optionally","`","with_input","`","or","`","with_loss","`"]
docstr: Initialize containers
docstr_tok: ["Initialize","containers"]
code: def before_validate(self):
      "Initialize containers"
      self.preds, self.targets = [], []
      if self.with_input:
          self.inputs = []
      if self.with_loss:
          self.losses = []
  
imports: from __future__ import annotations
  from ..data.all import *
  from ..optimizer import *
  from ..losses import BaseLoss
label_desc: Use image node_id 3 for calling the GatherPredsCallback obj's underlying member method code with example usage: obj.before_validate() without return types