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: Concatenate all recorded tensors
docstr_tok: ["Concatenate","all","recorded","tensors"]
code: def after_validate(self):
      "Concatenate all recorded tensors"
      if not hasattr(self, "preds"):
          return
      if self.with_input:
          self.inputs = detuplify(
              to_concat(self.inputs, dim=self.concat_dim)
          )
      if self.with_preds:
          self.preds = detuplify(
              to_concat(self.preds, dim=self.concat_dim)
          )
      if self.with_targs:
          self.targets = detuplify(
              to_concat(self.targets, dim=self.concat_dim)
          )
      if self.with_loss:
          self.losses = to_concat(self.losses)
  
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 GatherPredsCallback obj's underlying member method code with example usage: obj.after_validate() without return types