class_docstr: Create PNG plots of samples from a GAN model.
  
  Arguments:
      filename (string): Filename prefix for output PNGs.
      hw (int): Height and width of the images.
      nchan (int): number of channels.
      num_saples (int): how many samples to show from traning and generated data.
      sym_range (bool): pixel value [-1, 1] or [0, 1].
      padding (int): number of pixels to pad in output images.
      plot_width (int): width of output images.
      plot_height (int): height of output images.
      dpi (float): dots per inch.
      font_size (int): font size of labels.
      epoch_freq (int): number of epochs per plotting callback.
code: def _shape_transform(self, batch):
      assert (
          self.nchan * self.hw * self.hw == batch.shape[0]
      ), "wrong image size specified"
      assert (
          self.num_samples <= batch.shape[1]
      ), "number of samples must not exceed batch size"
  
      nrow = int(np.ceil(np.sqrt(self.num_samples)))
      ncol = int(np.ceil(1.0 * self.num_samples / nrow))
      width = ncol * (self.hw + self.padding) - self.padding
      height = nrow * (self.hw + self.padding) - self.padding
  
      batch = batch[:, : self.num_samples]
      batch = batch.reshape(
          self.nchan, self.hw, self.hw, self.num_samples
      )
      batch = np.swapaxes(np.swapaxes(batch, 0, 2), 0, 1)
  
      canvas = np.ones([height, width, self.nchan])
      for i in range(self.num_samples):
          irow, icol, step = i % nrow, i // nrow, self.hw + self.padding
          canvas[
              irow * step : irow * step + self.hw,
              icol * step : icol * step + self.hw,
              :,
          ] = batch[:, :, ::-1, i]
      if self.nchan == 1:
          canvas = canvas.reshape(height, width)
      return canvas
  
file_path: neon/neon/callbacks/plotting_callbacks.py
imports: from __future__ import division
  import logging
  import numpy
  from PIL import Image
  from neon.callbacks.callbacks import Callback
label_desc: Use image node_id 3 for calling the GANPlotCallback obj's underlying member method code with example usage: obj._shape_transform(batch) and returns: canvas