class_docstr: Generates candidates for Phoenix.
docstr: Bundles together averaged logits.
code: def _create_average_ensemble_logits(
      self, ensemble_logits, search_logits_specs
  ):
      """Bundles together averaged logits."""
  
      logits = tf.add_n(ensemble_logits) / len(ensemble_logits)
      ensemble_logits_spec = architecture_utils.LogitsSpec(
          logits=logits
      )
  
      if trial_utils.is_nonadaptive_ensemble_search(
          self._ensemble_spec
      ) or trial_utils.is_intermixed_ensemble_search(
          self._ensemble_spec
      ):
          return EnsembleLogits(
              train_logits_specs=[],
              eval_logits_spec=ensemble_logits_spec,
          )
  
      if trial_utils.is_adaptive_ensemble_search(self._ensemble_spec):
          return EnsembleLogits(
              train_logits_specs=search_logits_specs,
              eval_logits_spec=ensemble_logits_spec,
          )
  
      if trial_utils.is_residual_ensemble_search(self._ensemble_spec):
          return EnsembleLogits(
              train_logits_specs=[ensemble_logits_spec],
              eval_logits_spec=ensemble_logits_spec,
          )
  
file_path: model_search/model_search/ensembler.py
imports: import collections
  from model_search import logit_bundler
  from model_search.architecture import architecture_utils
  from model_search.generators import trial_utils
  from model_search.proto import ensembling_spec_pb2
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the Ensembler obj's underlying member method code with example usage: obj._create_average_ensemble_logits(ensemble_logits, search_logits_specs) and returns: EnsembleLogits, EnsembleLogits, EnsembleLogits