def on_cleanup_error(function, path, excinfo):
                click.secho("warning: failed to remove file or directory: {}\n"
                            "please delete it manually.".format(path),
                            fg="red")
def __init__(self, gan=None, config=None, trainer=None):
      super().__init__(config=config, gan=gan, trainer=trainer)
      self.d_grads = None
      self.g_grads = None