class_docstr: Mcro-benchmarks for a single layer of LSTM cells.
class_docstr_tok: ["Mcro-benchmarks","for","a","single","layer","of","LSTM","cells","."]
code: def _LayerBuilder(self, do_training):
      out_seq, weights = lstm.BuildLSTMLayer(
          FLAGS.batch_size,
          FLAGS.seq_length,
          FLAGS.num_inputs,
          FLAGS.num_nodes,
      )
      name, fetches = ("lstm_layer_inference", out_seq)
      if do_training:
          # Not a real loss function, but good enough for benchmarking backprop.
          loss = math_ops.reduce_sum(math_ops.add_n(out_seq))
          dw = gradients_impl.gradients(loss, weights)
          name, fetches = ("lstm_layer_training", dw)
  
      _DumpGraph(
          ops.get_default_graph(),
          "%s_%d_%d_%d_%d"
          % (
              name,
              FLAGS.batch_size,
              FLAGS.seq_length,
              FLAGS.num_inputs,
              FLAGS.num_nodes,
          ),
      )
      return name, fetches
  
imports: import argparse
  import os
  import sys
  import numpy
  from tensorflow.compiler.tests import lstm
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the LSTMBenchmark obj's underlying member method code with example usage: obj._LayerBuilder(do_training) and returns: name,  fetches