class_docstr: Simple Conv-1D classifier.
  This is a combination of the
  :class:`~texar.tf.modules.Conv1DEncoder` with a classification layer.
  
  Args:
      hparams (dict, optional): Hyperparameters. Missing
          hyperparamerter will be set to default values. See
          :meth:`default_hparams` for the hyperparameter sturcture and
          default values.
  
  Example:
  
      .. code-block:: python
  
          clas = Conv1DClassifier(hparams={'num_classes': 10})
  
          inputs = tf.random_uniform([64, 20, 256])
          logits, pred = clas(inputs)
          # logits == Tensor of shape [64, 10]
          # pred   == Tensor of shape [64]
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Simple","Conv-1D","classifier",".","This","is","a","combination","of","the",":","class",":","`","~texar.tf.modules.Conv1DEncoder","`","with","a","classification","layer",".","Args",":","hparams","(","dict",",","optional",")",":","Hyperparameters",".","Missing","hyperparamerter","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","sturcture","and","default","values",".","Example",":","..","code-block",":",":","python","clas","=","Conv1DClassifier","(","hparams=","{","'num_classes","'",":","10","}",")","inputs","=","tf.random_uniform","(","[","64",",","20",",","256","]",")","logits",",","pred","=","clas","(","inputs",")","#","logits","==","Tensor","of","shape","[","64",",","10","]","#","pred","==","Tensor","of","shape","[","64","]","..","document","private","functions","..","automethod",":",":","_build"]
docstr: Feeds the inputs through the network and makes classification.
  
  The arguments are the same as in :class:`~texar.tf.modules.Conv1DEncoder`.
  
  The predictions of binary classification ("num_classes"=1) and
  multi-way classification ("num_classes">1) are different, as explained
  below.
  
  Args:
      inputs: The inputs to the network, which is a 3D tensor. See
          :class:`~texar.tf.modules.Conv1DEncoder` for more details.
      sequence_length (optional): An int tensor of shape `[batch_size]`
          containing the length of each element in :attr:`inputs`.
          If given, time steps beyond the length will first be masked out
          before feeding to the layers.
      dtype (optional): Type of the inputs. If not provided, infers
          from inputs automatically.
      mode (optional): A tensor taking value in
          :tf_main:`tf.estimator.ModeKeys <estimator/ModeKeys>`, including
          `TRAIN`, `EVAL`, and `PREDICT`. If `None`,
          :func:`texar.tf.global_mode` is used.
  
  Returns:
      A tuple `(logits, pred)`, where
  
      - **`logits`** is a Tensor of shape `[batch_size, num_classes]`            for `num_classes` >1, and `[batch_size]` for `num_classes` =1             (i.e., binary classification).
      - **`pred`** is the prediction, a Tensor of shape `[batch_size]`             and type `tf.int64`. For binary classification, the standard             sigmoid function is used for prediction, and the class labels are             `{0, 1}`.
docstr_tok: ["Feeds","the","inputs","through","the","network","and","makes","classification",".","The","arguments","are","the","same","as","in",":","class",":","`","~texar.tf.modules.Conv1DEncoder","`",".","The","predictions","of","binary","classification","(","``","num_classes","''","=1",")","and","multi-way","classification","(","``","num_classes","''",">","1",")","are","different",",","as","explained","below",".","Args",":","inputs",":","The","inputs","to","the","network",",","which","is","a","3D","tensor",".","See",":","class",":","`","~texar.tf.modules.Conv1DEncoder","`","for","more","details",".","sequence_length","(","optional",")",":","An","int","tensor","of","shape","`","[","batch_size","]","`","containing","the","length","of","each","element","in",":","attr",":","`","inputs","`",".","If","given",",","time","steps","beyond","the","length","will","first","be","masked","out","before","feeding","to","the","layers",".","dtype","(","optional",")",":","Type","of","the","inputs",".","If","not","provided",",","infers","from","inputs","automatically",".","mode","(","optional",")",":","A","tensor","taking","value","in",":","tf_main",":","`","tf.estimator.ModeKeys","<","estimator\/ModeKeys",">","`",",","including","`","TRAIN","`",",","`","EVAL","`",",","and","`","PREDICT","`",".","If","`","None","`",",",":","func",":","`","texar.tf.global_mode","`","is","used",".","Returns",":","A","tuple","`","(","logits",",","pred",")","`",",","where","-","*","*","`","logits","`","*","*","is","a","Tensor","of","shape","`","[","batch_size",",","num_classes","]","`","for","`","num_classes","`",">","1",",","and","`","[","batch_size","]","`","for","`","num_classes","`","=1","(","i.e.",",","binary","classification",")",".","-","*","*","`","pred","`","*","*","is","the","prediction",",","a","Tensor","of","shape","`","[","batch_size","]","`","and","type","`","tf.int64","`",".","For","binary","classification",",","the","standard","sigmoid","function","is","used","for","prediction",",","and","the","class","labels","are","`","{","0",",","1","}","`","."]
code: def _build(
      self,  # pylint: disable=arguments-differ
      inputs,
      sequence_length=None,
      dtype=None,
      mode=None,
  ):
      """Feeds the inputs through the network and makes classification.
  
          The arguments are the same as in :class:`~texar.tf.modules.Conv1DEncoder`.
  
          The predictions of binary classification ("num_classes"=1) and
          multi-way classification ("num_classes">1) are different, as explained
          below.
  
          Args:
              inputs: The inputs to the network, which is a 3D tensor. See
                  :class:`~texar.tf.modules.Conv1DEncoder` for more details.
              sequence_length (optional): An int tensor of shape `[batch_size]`
                  containing the length of each element in :attr:`inputs`.
                  If given, time steps beyond the length will first be masked out
                  before feeding to the layers.
              dtype (optional): Type of the inputs. If not provided, infers
                  from inputs automatically.
              mode (optional): A tensor taking value in
                  :tf_main:`tf.estimator.ModeKeys <estimator/ModeKeys>`, including
                  `TRAIN`, `EVAL`, and `PREDICT`. If `None`,
                  :func:`texar.tf.global_mode` is used.
  
          Returns:
              A tuple `(logits, pred)`, where
  
              - **`logits`** is a Tensor of shape `[batch_size, num_classes]`\
              for `num_classes` >1, and `[batch_size]` for `num_classes` =1 \
              (i.e., binary classification).
              - **`pred`** is the prediction, a Tensor of shape `[batch_size]` \
              and type `tf.int64`. For binary classification, the standard \
              sigmoid function is used for prediction, and the class labels are \
              `{0, 1}`.
          """
      logits = self._encoder(inputs, sequence_length, dtype, mode)
  
      num_classes = self._hparams.num_classes
      is_binary = num_classes == 1
      is_binary = is_binary or (
          num_classes <= 0 and logits.shape[1] == 1
      )
  
      if is_binary:
          pred = tf.greater(logits, 0)
          logits = tf.reshape(logits, [-1])
      else:
          pred = tf.argmax(logits, 1)
      pred = tf.cast(tf.reshape(pred, [-1]), tf.int64)
  
      self._built = True
  
      return logits, pred
  
imports: import tensorflow
  from texar.tf.utils.exceptions import TexarError
  from texar.tf.modules.classifiers.classifier_base import ClassifierBase
  from texar.tf.modules.encoders.conv_encoders import Conv1DEncoder
  from texar.tf.utils import utils
  from texar.tf.hyperparams import HParams
label_desc: Use image node_id 3 for calling the Conv1DClassifier obj's underlying member method code with example usage: obj._build(inputs, sequence_length, dtype, mode) and returns: logits,  pred