class_docstr: The :class:`PadLayer` class is a padding layer for any mode and dimension.
  Please see `tf.pad <https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/pad>`__ for usage.
  
  Parameters
  ----------
  padding : list of lists of 2 ints, or a Tensor of type int32.
      The int32 values to pad.
  mode : str
      "CONSTANT", "REFLECT", or "SYMMETRIC" (case-insensitive).
  name : None or str
      A unique layer name.
  
  Examples
  --------
  With TensorLayer
  
  >>> net = tl.layers.Input([None, 224, 224, 3], name='input')
  >>> padlayer = tl.layers.PadLayer([[0, 0], [3, 3], [3, 3], [0, 0]], "REFLECT", name='inpad')(net)
  >>> print(padlayer)
  >>> output shape : (None, 106, 106, 3)
class_docstr_tok: ["The",":","class",":","`","PadLayer","`","class","is","a","padding","layer","for","any","mode","and","dimension",".","Please","see","`","tf.pad","<","https",":","\/\/www.tensorflow.org\/versions\/r2.0\/api_docs\/python\/tf\/pad",">","`","__","for","usage",".","Parameters","--","--","--","--","--","padding",":","list","of","lists","of","2","ints",",","or","a","Tensor","of","type","int32",".","The","int32","values","to","pad",".","mode",":","str","``","CONSTANT","''",",","``","REFLECT","''",",","or","``","SYMMETRIC","''","(","case-insensitive",")",".","name",":","None","or","str","A","unique","layer","name",".","Examples","--","--","--","--","With","TensorLayer",">",">",">","net","=","tl.layers.Input","(","[","None",",","224",",","224",",","3","]",",","name='input","'",")",">",">",">","padlayer","=","tl.layers.PadLayer","(","[","[","0",",","0","]",",","[","3",",","3","]",",","[","3",",","3","]",",","[","0",",","0","]","]",",","``","REFLECT","''",",","name='inpad","'",")","(","net",")",">",">",">","print","(","padlayer",")",">",">",">","output","shape",":","(","None",",","106",",","106",",","3",")"]
code: def __init__(
      self,
      padding=None,
      mode="CONSTANT",
      name=None,  # 'pad_layer',
  ):
      super().__init__(name)
      self.padding = padding
      self.mode = mode
  
      logging.info(
          "PadLayer   %s: padding: %s mode: %s"
          % (self.name, list(self.padding), self.mode)
      )
  
      if self.padding is None:
          raise Exception(
              "padding should be a Tensor of type int32. see https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/pad"
          )
  
      self.build()
      self._built = True
  
imports: import tensorflow
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias
  from tensorlayer.layers.core import Layer
label_desc: Use image node_id 1 to create a new PadLayer object from inherited base classes: Layer with example: obj = PadLayer(padding, mode, name)