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: Returns a dictionary of hyperparameters with default values.
  
  .. code-block:: python
  
      {
          # (1) Same hyperparameters as in Conv1DEncoder
          ...
  
          # (2) Additional hyperparameters
          "num_classes": 2,
          "logit_layer_kwargs": {
              "use_bias": False
          },
          "name": "conv1d_classifier"
      }
  
  Here:
  
  1. Same hyperparameters as in :class:`~texar.tf.modules.Conv1DEncoder`.
  See the :meth:`~texar.tf.modules.Conv1DEncoder.default_hparams`.
  An instance of Conv1DEncoder is created for feature extraction.
  
  2. Additional hyperparameters:
  
      "num_classes": int
          Number of classes:
  
          - If **`> 0`**, an additional :tf_main:`Dense <layers/Dense>`                 layer is appended to the encoder to compute the logits over                 classes.
          - If **`<= 0`**, no dense layer is appended. The number of                 classes is assumed to be the final dense layer size of the                 encoder.
  
      "logit_layer_kwargs": dict
          Keyword arguments for the logit Dense layer constructor,
          except for argument "units" which is set to "num_classes".
          Ignored if no extra logit layer is appended.
  
      "name": str
          Name of the classifier.
docstr_tok: ["Returns","a","dictionary","of","hyperparameters","with","default","values",".","..","code-block",":",":","python","{","#","(","1",")","Same","hyperparameters","as","in","Conv1DEncoder","...","#","(","2",")","Additional","hyperparameters","``","num_classes","''",":","2",",","``","logit_layer_kwargs","''",":","{","``","use_bias","''",":","False","}",",","``","name","''",":","``","conv1d_classifier","''","}","Here",":","1",".","Same","hyperparameters","as","in",":","class",":","`","~texar.tf.modules.Conv1DEncoder","`",".","See","the",":","meth",":","`","~texar.tf.modules.Conv1DEncoder.default_hparams","`",".","An","instance","of","Conv1DEncoder","is","created","for","feature","extraction",".","2",".","Additional","hyperparameters",":","``","num_classes","''",":","int","Number","of","classes",":","-","If","*","*","`",">","0","`","*","*",",","an","additional",":","tf_main",":","`","Dense","<","layers\/Dense",">","`","layer","is","appended","to","the","encoder","to","compute","the","logits","over","classes",".","-","If","*","*","`","<","=","0","`","*","*",",","no","dense","layer","is","appended",".","The","number","of","classes","is","assumed","to","be","the","final","dense","layer","size","of","the","encoder",".","``","logit_layer_kwargs","''",":","dict","Keyword","arguments","for","the","logit","Dense","layer","constructor",",","except","for","argument","``","units","''","which","is","set","to","``","num_classes","''",".","Ignored","if","no","extra","logit","layer","is","appended",".","``","name","''",":","str","Name","of","the","classifier","."]
code: def default_hparams():
      """Returns a dictionary of hyperparameters with default values.
  
          .. code-block:: python
  
              {
                  # (1) Same hyperparameters as in Conv1DEncoder
                  ...
  
                  # (2) Additional hyperparameters
                  "num_classes": 2,
                  "logit_layer_kwargs": {
                      "use_bias": False
                  },
                  "name": "conv1d_classifier"
              }
  
          Here:
  
          1. Same hyperparameters as in :class:`~texar.tf.modules.Conv1DEncoder`.
          See the :meth:`~texar.tf.modules.Conv1DEncoder.default_hparams`.
          An instance of Conv1DEncoder is created for feature extraction.
  
          2. Additional hyperparameters:
  
              "num_classes": int
                  Number of classes:
  
                  - If **`> 0`**, an additional :tf_main:`Dense <layers/Dense>` \
                  layer is appended to the encoder to compute the logits over \
                  classes.
                  - If **`<= 0`**, no dense layer is appended. The number of \
                  classes is assumed to be the final dense layer size of the \
                  encoder.
  
              "logit_layer_kwargs": dict
                  Keyword arguments for the logit Dense layer constructor,
                  except for argument "units" which is set to "num_classes".
                  Ignored if no extra logit layer is appended.
  
              "name": str
                  Name of the classifier.
          """
      hparams = Conv1DEncoder.default_hparams()
      hparams.update(
          {
              "name": "conv1d_classifier",
              "num_classes": 2,  # set to <=0 to avoid appending output layer
              "logit_layer_kwargs": {"use_bias": False},
          }
      )
      return hparams
  
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 2 for calling the Conv1DClassifier obj's underlying member method code with example usage: obj.default_hparams() and returns: hparams