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","`"]
code: def __init__(
      self,
      with_input: bool = False,  # Whether to return inputs
      with_loss: bool = False,  # Whether to return losses
      save_preds: Path = None,  # Path to save predictions
      save_targs: Path = None,  # Path to save targets
      with_preds: bool = True,  # Whether to return predictions
      with_targs: bool = True,  # Whether to return targets
      concat_dim: int = 0,  # Dimension to concatenate returned tensors
      pickle_protocol: int = 2,  # Pickle protocol used to save predictions and targets
  ):
      store_attr()
  
imports: from __future__ import annotations
  from ..data.all import *
  from ..optimizer import *
  from ..losses import BaseLoss
label_desc: Use image node_id 1 to create a new GatherPredsCallback object from inherited base classes: Callback with example: obj = GatherPredsCallback(with_input, with_loss, save_preds, save_targs, with_preds, with_targs, concat_dim, pickle_protocol)