def _save_cfg_in_ckpt(self):
        """Saves the configuration in the experiment's output directory."""
        final_cfg = {}
        if hasattr(self, "cfg"):
            for k in self.cfg.keys():
                if hasattr(self, k.lower()):
                    if getattr(self, k.lower()) is not None:
                        final_cfg[k] = getattr(self, k.lower())
            if not self.test_mode:
                with open(os.path.join(self.checkpoint_dir, "cfg.yml"), "w") as f:
                    yaml.dump(final_cfg, f)
Saves the configuration in the experiment's output directory.
examples/inverse_gan_author_utils.py