class_docstr: Configurable seq2seq model used for Neural Architecture Search.
  
  Models are defined by 26 hparam fields. They are:
    - <encoder/decoder>_num_cells: The number of cells in the <encoder/decoder>.
    - <encoder/decoder>_<left/right>_layers: List of layers used the
                                             <encoder/decoder> <left/right>
                                             branch. For available layers, see
                                             the nas_layers.py file.
    - <encoder/decoder>_<left/right_inputs>: List of inputs to the
                                             <encoder/decoder> <left/right>
                                             layers. Each index i specifies the
                                             i_th layer's output with 0
                                             representing the cell input
                                             tensor.
    - <encoder/decoder>_<left/right>_output_dims: List of absolute output
                                                  dimensions for each layer.
    - <encoder/decoder>_<left/right>_activation: List of activations applied
                                                 after each layer.
                                                 ACTIVATION_MAP holds the valid
                                                 activations.
    - <encoder/decoder>_<left/right>_norms: List of norms applied before each
                                            layer. Must be either "layer_norm"
                                            or "none".
    - <encoder/decoder>_combiner_functions: List of functions used to combine
                                            each left/right branch pair.
                                            Options are listed in
                                            COMBINER_FUNCTIONS.
    - <encoder/decoder>_final_combiner_function: Function applied to combine
                                                 all the block outputs that are
                                                 not used as inputs to other
                                                 blocks. Options are listed in
                                                 COMBINER_FUNCTIONS.
  
  For an example of how to set these hparams, please see nas_seq2seq_base().
class_docstr_tok: ["Configurable","seq2seq","model","used","for","Neural","Architecture","Search",".","Models","are","defined","by","26","hparam","fields",".","They","are",":","-","<","encoder\/decoder",">","_num_cells",":","The","number","of","cells","in","the","<","encoder\/decoder",">",".","-","<","encoder\/decoder",">","_","<","left\/right",">","_layers",":","List","of","layers","used","the","<","encoder\/decoder",">","<","left\/right",">","branch",".","For","available","layers",",","see","the","nas_layers.py","file",".","-","<","encoder\/decoder",">","_","<","left\/right_inputs",">",":","List","of","inputs","to","the","<","encoder\/decoder",">","<","left\/right",">","layers",".","Each","index","i","specifies","the","i_th","layer","'s","output","with","0","representing","the","cell","input","tensor",".","-","<","encoder\/decoder",">","_","<","left\/right",">","_output_dims",":","List","of","absolute","output","dimensions","for","each","layer",".","-","<","encoder\/decoder",">","_","<","left\/right",">","_activation",":","List","of","activations","applied","after","each","layer",".","ACTIVATION_MAP","holds","the","valid","activations",".","-","<","encoder\/decoder",">","_","<","left\/right",">","_norms",":","List","of","norms","applied","before","each","layer",".","Must","be","either","``","layer_norm","''","or","``","none","''",".","-","<","encoder\/decoder",">","_combiner_functions",":","List","of","functions","used","to","combine","each","left\/right","branch","pair",".","Options","are","listed","in","COMBINER_FUNCTIONS",".","-","<","encoder\/decoder",">","_final_combiner_function",":","Function","applied","to","combine","all","the","block","outputs","that","are","not","used","as","inputs","to","other","blocks",".","Options","are","listed","in","COMBINER_FUNCTIONS",".","For","an","example","of","how","to","set","these","hparams",",","please","see","nas_seq2seq_base","(",")","."]
docstr: Construct EstimatorSpec for GPU EVAL mode.
docstr_tok: ["Construct","EstimatorSpec","for","GPU","EVAL","mode","."]
code: def _gpu_estimator_spec_eval(
      self, features, logits, labels, loss, losses_dict
  ):
      """Construct EstimatorSpec for GPU EVAL mode."""
      hparams = self.hparams
  
      if not hasattr(hparams, "problem"):
          raise NotImplementedError(
              "hparams is missing attribute `problem`. NasSeq2Seq must "
              "be used with a problem."
          )
  
      # TPU is not supported.
      eval_metrics_fns = metrics.create_evaluation_metrics(
          [hparams.problem], hparams
      )
      eval_metrics = {}
      for metric_name, metric_fn in six.iteritems(eval_metrics_fns):
          if "rouge" not in metric_name and "bleu" not in metric_name:
              eval_metrics[metric_name] = metric_fn(
                  logits, features, features["targets"]
              )
  
      return tf_estimator.EstimatorSpec(
          tf_estimator.ModeKeys.EVAL,
          predictions={"predictions": logits},
          eval_metric_ops=eval_metrics,
          loss=loss,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.models.neural_architecture_search import nas_layers
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 6 for calling the NasSeq2Seq obj's underlying member method code with example usage: obj._gpu_estimator_spec_eval(features, logits, labels, loss, losses_dict) and returns: tf_estimator