class_docstr: Generates a two DNN subnetworks at each iteration.
  
  The first DNN has an identical shape to the most recently added subnetwork
  in `previous_ensemble`. The second has the same shape plus one more dense
  layer on top. This is similar to the adaptive network presented in Figure 2 of
  [Cortes et al. ICML 2017](https://arxiv.org/abs/1607.01097), without the
  connections to hidden layers of networks from previous iterations.
docstr: See `adanet.subnetwork.Generator`.
docstr_tok: ["See","`","adanet.subnetwork.Generator","`","."]
code: def generate_candidates(
      self,
      previous_ensemble,
      iteration_number,
      previous_ensemble_reports,
      all_reports,
  ):
      """See `adanet.subnetwork.Generator`."""
  
      num_layers = self._initial_num_layers
      if previous_ensemble:
          num_layers = previous_ensemble.weighted_subnetworks[
              -1
          ].subnetwork.shared[_NUM_LAYERS_KEY]
      return [
          self._dnn_builder_fn(num_layers=num_layers),
          self._dnn_builder_fn(num_layers=num_layers + 1),
      ]
  
file_path: adanet/adanet/examples/simple_dnn.py
imports: import functools
  import adanet
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the Generator obj's underlying member method code with example usage: obj.generate_candidates(previous_ensemble, iteration_number, previous_ensemble_reports, all_reports) and returns: list