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: If `with_input`, detach batch inputs
docstr_tok: ["If","`","with_input","`",",","detach","batch","inputs"]
code: def before_batch(self):
      "If `with_input`, detach batch inputs"
      if self.with_input:
          self.inputs.append((self.learn.to_detach(self.xb)))
  
imports: from __future__ import annotations
  from ..data.all import *
  from ..optimizer import *
  from ..losses import BaseLoss
label_desc: Use image node_id 2 for calling the GatherPredsCallback obj's underlying member method code with example usage: obj.before_batch() without return types