code: def __init__(
      self,
      generator_fn,
      discriminator_fn,
      generator_loss_fn,
      discriminator_loss_fn,
      generator_optimizer,
      discriminator_optimizer,
      generator_steps=1,
      discriminator_steps=1,
      model_dir=None,
      session_config=None,
  ):
      from zoo.tfpark import ZooOptimizer
  
      assert isinstance(
          generator_optimizer, ZooOptimizer
      ), "generator_optimizer should be a ZooOptimizer"
      assert isinstance(
          discriminator_optimizer, ZooOptimizer
      ), "discriminator_optimizer should be a ZooOptimizer"
      self._generator_fn = generator_fn
      self._discriminator_fn = discriminator_fn
      self._generator_loss_fn = generator_loss_fn
      self._discriminator_loss_fn = discriminator_loss_fn
      self._generator_steps = generator_steps
      self._discriminator_steps = discriminator_steps
      self._gen_opt = generator_optimizer
      self._dis_opt = discriminator_optimizer
      self._session_config = session_config
  
      if model_dir is None:
          folder = tempfile.mkdtemp()
          self.checkpoint_path = os.path.join(folder, "model")
          self.model_dir = folder
      else:
          self.checkpoint_path = os.path.join(model_dir, "model")
          self.model_dir = model_dir
  
file_path: analytics-zoo/pyzoo/zoo/tfpark/gan/gan_estimator.py
imports: import inspect
  import os
  import tempfile
  import tensorflow
  from zoo.tfpark import TFOptimizer
  from zoo.tfpark.zoo_optimizer import FakeOptimMethod
  from zoo.util import nest
label_desc: Use image node_id 1 to create a new GANEstimator object from inherited base classes: object with example: obj = GANEstimator(generator_fn, discriminator_fn, generator_loss_fn, discriminator_loss_fn, generator_optimizer, discriminator_optimizer, generator_steps, discriminator_steps, model_dir, session_config)