class_docstr: Interface for a subnetwork builder.
  
  Given features, labels, and the best ensemble of subnetworks at iteration
  t-1, a `Builder` creates a `Subnetwork` to add to a candidate
  ensemble at iteration t. These candidate ensembles are evaluated against one
  another at the end of the iteration, and the best one is selected based on its
  complexity-regularized loss.
class_docstr_tok: ["Interface","for","a","subnetwork","builder",".","Given","features",",","labels",",","and","the","best","ensemble","of","subnetworks","at","iteration","t-1",",","a","`","Builder","`","creates","a","`","Subnetwork","`","to","add","to","a","candidate","ensemble","at","iteration","t.","These","candidate","ensembles","are","evaluated","against","one","another","at","the","end","of","the","iteration",",","and","the","best","one","is","selected","based","on","its","complexity-regularized","loss","."]
docstr: Returns an op for training a new subnetwork.
  
  This method will be called once after :meth:`build_subnetwork`.
  
  Accessing the global step via :meth:`tf.train.get_or_create_global_step()`
  or
  :meth:`tf.train.get_global_step()` within this scope will return an
  incrementable
  iteration step since the beginning of the iteration.
  
  Args:
    subnetwork: Newest subnetwork, that is not part of the
      `previous_ensemble`.
    loss: A :class:`tf.Tensor` containing the subnetwork's loss to minimize.
    var_list: List of subnetwork :class:`tf.Variable` parameters to update as
      part of the training operation.
    labels: Labels :class:`tf.Tensor` or a dictionary of string label name to
      :class:`tf.Tensor` (for multi-head).
    iteration_step: Integer :class:`tf.Tensor` representing the step since the
      beginning of the current iteration, as opposed to the global step.
    summary: An :class:`adanet.Summary` for scoping summaries to individual
      subnetworks in Tensorboard. Using `tf.summary` within this scope will
      use this :class:`adanet.Summary` under the hood.
    previous_ensemble: The best `Ensemble` from iteration t-1. The created
      subnetwork will extend the previous ensemble to form the `Ensemble` at
      iteration t. Is None for iteration 0.
  
  Returns:
    Either a train op or an :class:`adanet.subnetwork.TrainOpSpec`.
docstr_tok: ["Returns","an","op","for","training","a","new","subnetwork",".","This","method","will","be","called","once","after",":","meth",":","`","build_subnetwork","`",".","Accessing","the","global","step","via",":","meth",":","`","tf.train.get_or_create_global_step","(",")","`","or",":","meth",":","`","tf.train.get_global_step","(",")","`","within","this","scope","will","return","an","incrementable","iteration","step","since","the","beginning","of","the","iteration",".","Args",":","subnetwork",":","Newest","subnetwork",",","that","is","not","part","of","the","`","previous_ensemble","`",".","loss",":","A",":","class",":","`","tf.Tensor","`","containing","the","subnetwork","'s","loss","to","minimize",".","var_list",":","List","of","subnetwork",":","class",":","`","tf.Variable","`","parameters","to","update","as","part","of","the","training","operation",".","labels",":","Labels",":","class",":","`","tf.Tensor","`","or","a","dictionary","of","string","label","name","to",":","class",":","`","tf.Tensor","`","(","for","multi-head",")",".","iteration_step",":","Integer",":","class",":","`","tf.Tensor","`","representing","the","step","since","the","beginning","of","the","current","iteration",",","as","opposed","to","the","global","step",".","summary",":","An",":","class",":","`","adanet.Summary","`","for","scoping","summaries","to","individual","subnetworks","in","Tensorboard",".","Using","`","tf.summary","`","within","this","scope","will","use","this",":","class",":","`","adanet.Summary","`","under","the","hood",".","previous_ensemble",":","The","best","`","Ensemble","`","from","iteration","t-1",".","The","created","subnetwork","will","extend","the","previous","ensemble","to","form","the","`","Ensemble","`","at","iteration","t.","Is","None","for","iteration","0",".","Returns",":","Either","a","train","op","or","an",":","class",":","`","adanet.subnetwork.TrainOpSpec","`","."]
code: def build_subnetwork_train_op(
      self,
      subnetwork,
      loss,
      var_list,
      labels,
      iteration_step,
      summary,
      previous_ensemble,
  ):
      """Returns an op for training a new subnetwork.
  
      This method will be called once after :meth:`build_subnetwork`.
  
      Accessing the global step via :meth:`tf.train.get_or_create_global_step()`
      or
      :meth:`tf.train.get_global_step()` within this scope will return an
      incrementable
      iteration step since the beginning of the iteration.
  
      Args:
        subnetwork: Newest subnetwork, that is not part of the
          `previous_ensemble`.
        loss: A :class:`tf.Tensor` containing the subnetwork's loss to minimize.
        var_list: List of subnetwork :class:`tf.Variable` parameters to update as
          part of the training operation.
        labels: Labels :class:`tf.Tensor` or a dictionary of string label name to
          :class:`tf.Tensor` (for multi-head).
        iteration_step: Integer :class:`tf.Tensor` representing the step since the
          beginning of the current iteration, as opposed to the global step.
        summary: An :class:`adanet.Summary` for scoping summaries to individual
          subnetworks in Tensorboard. Using `tf.summary` within this scope will
          use this :class:`adanet.Summary` under the hood.
        previous_ensemble: The best `Ensemble` from iteration t-1. The created
          subnetwork will extend the previous ensemble to form the `Ensemble` at
          iteration t. Is None for iteration 0.
  
      Returns:
        Either a train op or an :class:`adanet.subnetwork.TrainOpSpec`.
      """
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import collections
  import six
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj.build_subnetwork_train_op(subnetwork, loss, var_list, labels, iteration_step, summary, previous_ensemble) without return types