code: def residual_dilated_conv(x, repeat, padding, name, hparams):
      """A stack of convolution blocks with residual connections."""
      with tf.variable_scope(name):
          k = (hparams.kernel_height, hparams.kernel_width)
          dilations_and_kernels = [
              ((2**i, 1), k) for i in range(hparams.num_hidden_layers)
          ]
          for i in range(repeat):
              with tf.variable_scope("repeat_%d" % i):
                  y = common_layers.conv_block(
                      common_layers.layer_norm(
                          x, hparams.hidden_size, name="lnorm"
                      ),
                      hparams.hidden_size,
                      dilations_and_kernels,
                      padding=padding,
                      name="residual_conv",
                  )
                  y = tf.nn.dropout(y, 1.0 - hparams.dropout)
                  x += y
          return x
  
file_path: tensor2tensor/tensor2tensor/models/bytenet.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 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: residual_dilated_conv(x, repeat, padding, name, hparams) and returns: x