class_docstr: Simple Conv-1D network which consists of a sequence of conv layers
  followed with a sequence of dense layers.
  
  Args:
      hparams (dict, optional): Hyperparameters. Missing
          hyperparamerter will be set to default values. See
          :meth:`default_hparams` for the hyperparameter sturcture and
          default values.
  
  See :meth:`_build` for the inputs and outputs. The inputs must be a
  3D Tensor of shape `[batch_size, length, channels]` (default), or
  `[batch_size, channels, length]` (if `data_format` is set to
  `'channels_last'` through :attr:`hparams`). For example, for sequence
  classification, `length` corresponds to time steps, and `channels`
  corresponds to embedding dim.
  
  Example:
  
      .. code-block:: python
  
          nn = Conv1DNetwork() # Use the default structure
  
          inputs = tf.random_uniform([64, 20, 256])
          outputs = nn(inputs)
          # outputs == Tensor of shape [64, 128], cuz the final dense layer
          # has size 128.
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Simple","Conv-1D","network","which","consists","of","a","sequence","of","conv","layers","followed","with","a","sequence","of","dense","layers",".","Args",":","hparams","(","dict",",","optional",")",":","Hyperparameters",".","Missing","hyperparamerter","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","sturcture","and","default","values",".","See",":","meth",":","`","_build","`","for","the","inputs","and","outputs",".","The","inputs","must","be","a","3D","Tensor","of","shape","`","[","batch_size",",","length",",","channels","]","`","(","default",")",",","or","`","[","batch_size",",","channels",",","length","]","`","(","if","`","data_format","`","is","set","to","`","'channels_last","'","`","through",":","attr",":","`","hparams","`",")",".","For","example",",","for","sequence","classification",",","`","length","`","corresponds","to","time","steps",",","and","`","channels","`","corresponds","to","embedding","dim",".","Example",":","..","code-block",":",":","python","nn","=","Conv1DNetwork","(",")","#","Use","the","default","structure","inputs","=","tf.random_uniform","(","[","64",",","20",",","256","]",")","outputs","=","nn","(","inputs",")","#","outputs","==","Tensor","of","shape","[","64",",","128","]",",","cuz","the","final","dense","layer","#","has","size","128",".","..","document","private","functions","..","automethod",":",":","_build"]
code: def _build_pool_hparams(self):
      pool_type = self._hparams.pooling
      if pool_type == "MaxPooling":
          pool_type = "MaxPooling1D"
      elif pool_type == "AveragePooling":
          pool_type = "AveragePooling1D"
  
      npool = self._hparams.num_conv_layers
      pool_size = _to_list(self._hparams.pool_size, "pool_size", npool)
      strides = _to_list(
          self._hparams.pool_strides, "pool_strides", npool
      )
  
      other_kwargs = self._hparams.other_pool_kwargs or {}
      if isinstance(other_kwargs, HParams):
          other_kwargs = other_kwargs.todict()
      if not isinstance(other_kwargs, dict):
          raise ValueError(
              "hparams['other_pool_kwargs'] must be a dict."
          )
  
      pool_hparams = []
      for i in range(npool):
          kwargs_i = {
              "pool_size": pool_size[i],
              "strides": strides[i],
              "name": "pool_%d" % (i + 1),
          }
          kwargs_i.update(other_kwargs)
          pool_hparams_ = get_pooling_layer_hparams(
              {"type": pool_type, "kwargs": kwargs_i}
          )
          pool_hparams.append(pool_hparams_)
  
      return pool_hparams
  
file_path: texar/texar/tf/modules/networks/conv_networks.py
imports: import tensorflow
  from texar.tf.modules.networks.network_base import FeedForwardNetworkBase
  from texar.tf.modules.networks.network_base import _build_layers
  from texar.tf.core.layers import get_pooling_layer_hparams, get_activation_fn
  from texar.tf.utils.utils import uniquify_str
  from texar.tf.utils.shapes import mask_sequences
  from texar.tf.hyperparams import HParams
label_desc: Use image node_id 3 for calling the Conv1DNetwork obj's underlying member method code with example usage: obj._build_pool_hparams() and returns: pool_hparams