class_docstr: The :class:`MakeGrid` callback is a :class:`CachingImagingCallback` which calls make grid on the cache with the
  provided parameters.
  
  Args:
      key (StateKey): The :class:`.StateKey` containing image data (tensor of size [b, c, w, h])
      transform (callable, optional): A function/transform that  takes in a Tensor and returns a transformed version.
          This will be applied to the image before it is sent to output.
      num_images: The number of images to cache
      nrow: See `torchvision.utils.make_grid <https://pytorch.org/docs/stable/torchvision/utils.html#torchvision.utils.make_grid>`_
      padding: See `torchvision.utils.make_grid <https://pytorch.org/docs/stable/torchvision/utils.html#torchvision.utils.make_grid>`_
      normalize: See `torchvision.utils.make_grid <https://pytorch.org/docs/stable/torchvision/utils.html#torchvision.utils.make_grid>`_
      norm_range: See `torchvision.utils.make_grid <https://pytorch.org/docs/stable/torchvision/utils.html#torchvision.utils.make_grid>`_
      scale_each: See `torchvision.utils.make_grid <https://pytorch.org/docs/stable/torchvision/utils.html#torchvision.utils.make_grid>`_
      pad_value: See `torchvision.utils.make_grid <https://pytorch.org/docs/stable/torchvision/utils.html#torchvision.utils.make_grid>`_
class_docstr_tok: ["The",":","class",":","`","MakeGrid","`","callback","is","a",":","class",":","`","CachingImagingCallback","`","which","calls","make","grid","on","the","cache","with","the","provided","parameters",".","Args",":","key","(","StateKey",")",":","The",":","class",":","`",".StateKey","`","containing","image","data","(","tensor","of","size","[","b",",","c",",","w",",","h","]",")","transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","a","Tensor","and","returns","a","transformed","version",".","This","will","be","applied","to","the","image","before","it","is","sent","to","output",".","num_images",":","The","number","of","images","to","cache","nrow",":","See","`","torchvision.utils.make_grid","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/utils.html","#","torchvision.utils.make_grid",">","`","_","padding",":","See","`","torchvision.utils.make_grid","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/utils.html","#","torchvision.utils.make_grid",">","`","_","normalize",":","See","`","torchvision.utils.make_grid","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/utils.html","#","torchvision.utils.make_grid",">","`","_","norm_range",":","See","`","torchvision.utils.make_grid","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/utils.html","#","torchvision.utils.make_grid",">","`","_","scale_each",":","See","`","torchvision.utils.make_grid","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/utils.html","#","torchvision.utils.make_grid",">","`","_","pad_value",":","See","`","torchvision.utils.make_grid","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/utils.html","#","torchvision.utils.make_grid",">","`","_"]
code: def on_cache(self, cache, state):
      import torchvision.utils as utils
  
      return utils.make_grid(
          cache,
          nrow=self.nrow,
          padding=self.padding,
          normalize=self.normalize,
          range=self.norm_range,
          scale_each=self.scale_each,
          pad_value=self.pad_value,
      )
  
imports: import torchbearer
  from torchbearer import Callback
  import torch
label_desc: Use image node_id 2 for calling the MakeGrid obj's underlying member method code with example usage: obj.on_cache(cache, state) and returns: utils