research/improve_nas/trainer/improve_nas.py [220:249]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def __init__(self,
               feature_columns,
               optimizer_fn,
               iteration_steps,
               checkpoint_dir,
               hparams,
               seed=None):
    """Initializes a `Generator`.

    Args:
      feature_columns: The input feature columns of the problem.
      optimizer_fn: Function that accepts a float 'learning_rate' argument and
        returns an `Optimizer` instance and learning rate `Tensor` which may
        have a custom learning rate schedule applied.
      iteration_steps: The number of train steps in per iteration. Required for
        ScheduleDropPath algorithm.
      checkpoint_dir: Checkpoint directory.
      hparams: Hyper-parameters.
      seed: A Python integer. Used to create random seeds. See
        tf.set_random_seed for behavior.

    Returns:
      An instance of `Generator`.

    Raises:
      ValueError: If num_cells is not divisible by 3.
    """

    if hparams.num_cells % 3 != 0:
      raise ValueError("num_cells must be a multiple of 3.")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



research/improve_nas/trainer/improve_nas.py [269:300]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def __init__(self,
               feature_columns,
               optimizer_fn,
               iteration_steps,
               checkpoint_dir,
               hparams,
               seed=None):
    """Generator that gradually grows the architecture.

    In each iteration, we generate one deeper candidate and one wider candidate.

    Args:
      feature_columns: The input feature columns of the problem.
      optimizer_fn: Function that accepts a float 'learning_rate' argument and
        returns an `Optimizer` instance and learning rate `Tensor` which may
        have a custom learning rate schedule applied.
      iteration_steps: The number of train steps in per iteration. Required for
        ScheduleDropPath algorithm.
      checkpoint_dir: Checkpoint directory.
      hparams: Hyper-parameters.
      seed: A Python integer. Used to create random seeds. See
        tf.set_random_seed for behavior.

    Returns:
      An instance of `Generator`.

    Raises:
      ValueError: If num_cells is not divisible by 3.
    """

    if hparams.num_cells % 3 != 0:
      raise ValueError("num_cells must be a multiple of 3.")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



