code: def conv_layer(
      x,
      hidden_size,
      kernel_size,
      stride,
      pooling_window,
      dropout_rate,
      dilation_rate,
      name="conv",
  ):
      """Single conv layer with relu, optional pooling, and dropout."""
      with tf.variable_scope(name):
          out = x
          out = common_layers.conv1d_block(
              out,
              hidden_size,
              [(dilation_rate, kernel_size)],
              strides=stride,
              first_relu=False,
              padding="same",
          )
          out = tf.nn.relu(out)
          if pooling_window:
              out = tf.layers.max_pooling1d(
                  out, pooling_window, pooling_window, padding="same"
              )
          out = tf.layers.dropout(out, dropout_rate)
          return out
  
file_path: tensor2tensor/tensor2tensor/models/research/gene_expression.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: conv_layer(x, hidden_size, kernel_size, stride, pooling_window, dropout_rate, dilation_rate, name) and returns: out