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 on_epoch_end(self, callback_data, model, epoch):
      # convert to numpy arrays
      data_batch = model.data_batch.get()
      noise_batch = model.noise_batch.get()
      # value transform
      data_batch = self._value_transform(data_batch)
      noise_batch = self._value_transform(noise_batch)
      # shape transform
      data_canvas = self._shape_transform(data_batch)
      noise_canvas = self._shape_transform(noise_batch)
      # plotting options
      im_args = dict(interpolation="nearest", vmin=0.0, vmax=1.0)
      if self.nchan == 1:
          im_args["cmap"] = plt.get_cmap("gray")
      fname = self.filename + "_data_" + "{:03d}".format(epoch) + ".png"
      Image.fromarray(np.uint8(data_canvas * 255)).convert("RGB").save(
          fname
      )
      fname = (
          self.filename + "_noise_" + "{:03d}".format(epoch) + ".png"
      )
      Image.fromarray(np.uint8(noise_canvas * 255)).convert("RGB").save(
          fname
      )
  
      # plot logged WGAN costs if logged
      if model.cost.costfunc.func == "wasserstein":
          giter = callback_data["gan/gen_iter"][:]
          nonzeros = np.where(giter)
          giter = giter[nonzeros]
          cost_dis = callback_data["gan/cost_dis"][:][nonzeros]
          w_dist = medfilt(
              np.array(-cost_dis, dtype="float64"), kernel_size=101
          )
          plt.figure(
              figsize=(400 / self.dpi, 300 / self.dpi), dpi=self.dpi
          )
          plt.plot(giter, -cost_dis, "k-", lw=0.25)
          plt.plot(giter, w_dist, "r-", lw=2.0)
          plt.title(self.filename, fontsize=self.font_size)
          plt.xlabel("Generator Iterations", fontsize=self.font_size)
          plt.ylabel("Wasserstein estimate", fontsize=self.font_size)
          plt.margins(0, 0, tight=True)
          plt.savefig(
              self.filename + "_training.png", bbox_inches="tight"
          )
          plt.close()
  
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 4 for calling the GANPlotCallback obj's underlying member method code with example usage: obj.on_epoch_end(callback_data, model, epoch) without return types