class_docstr: Simplified version of :class:`Conv2dLayer`.
  
  Parameters
  ----------
  n_filter : int
      The number of filters.
  filter_size : tuple of int
      The filter size (height, width).
  strides : tuple of int
      The sliding window strides of corresponding input dimensions.
      It must be in the same order as the ``shape`` parameter.
  dilation_rate : tuple of int
      Specifying the dilation rate to use for dilated convolution.
  act : activation function
      The activation function of this layer.
  padding : str
      The padding algorithm type: "SAME" or "VALID".
  data_format : str
      "channels_last" (NHWC, default) or "channels_first" (NCHW).
  W_init : initializer
      The initializer for the the weight matrix.
  b_init : initializer or None
      The initializer for the the bias vector. If None, skip biases.
  in_channels : int
      The number of in channels.
  name : None or str
      A unique layer name.
  
  Examples
  --------
  With TensorLayer
  
  >>> net = tl.layers.Input([8, 400, 400, 3], name='input')
  >>> conv2d = tl.layers.Conv2d(n_filter=32, filter_size=(3, 3), strides=(2, 2), b_init=None, in_channels=3, name='conv2d_1')
  >>> print(conv2d)
  >>> tensor = tl.layers.Conv2d(n_filter=32, filter_size=(3, 3), strides=(2, 2), act=tf.nn.relu, name='conv2d_2')(net)
  >>> print(tensor)
class_docstr_tok: ["Simplified","version","of",":","class",":","`","Conv2dLayer","`",".","Parameters","--","--","--","--","--","n_filter",":","int","The","number","of","filters",".","filter_size",":","tuple","of","int","The","filter","size","(","height",",","width",")",".","strides",":","tuple","of","int","The","sliding","window","strides","of","corresponding","input","dimensions",".","It","must","be","in","the","same","order","as","the","``","shape","``","parameter",".","dilation_rate",":","tuple","of","int","Specifying","the","dilation","rate","to","use","for","dilated","convolution",".","act",":","activation","function","The","activation","function","of","this","layer",".","padding",":","str","The","padding","algorithm","type",":","``","SAME","''","or","``","VALID","''",".","data_format",":","str","``","channels_last","''","(","NHWC",",","default",")","or","``","channels_first","''","(","NCHW",")",".","W_init",":","initializer","The","initializer","for","the","the","weight","matrix",".","b_init",":","initializer","or","None","The","initializer","for","the","the","bias","vector",".","If","None",",","skip","biases",".","in_channels",":","int","The","number","of","in","channels",".","name",":","None","or","str","A","unique","layer","name",".","Examples","--","--","--","--","With","TensorLayer",">",">",">","net","=","tl.layers.Input","(","[","8",",","400",",","400",",","3","]",",","name='input","'",")",">",">",">","conv2d","=","tl.layers.Conv2d","(","n_filter=32",",","filter_size=","(","3",",","3",")",",","strides=","(","2",",","2",")",",","b_init=None",",","in_channels=3",",","name='conv2d_1","'",")",">",">",">","print","(","conv2d",")",">",">",">","tensor","=","tl.layers.Conv2d","(","n_filter=32",",","filter_size=","(","3",",","3",")",",","strides=","(","2",",","2",")",",","act=tf.nn.relu",",","name='conv2d_2","'",")","(","net",")",">",">",">","print","(","tensor",")"]
code: def __init__(
      self,
      n_filter=32,
      filter_size=(3, 3),
      strides=(1, 1),
      act=None,
      padding="SAME",
      data_format="channels_last",
      dilation_rate=(1, 1),
      W_init=tl.initializers.truncated_normal(stddev=0.02),
      b_init=tl.initializers.constant(value=0.0),
      in_channels=None,
      name=None,  # 'conv2d',
  ):
      super().__init__(name, act=act)
      self.n_filter = n_filter
      self.filter_size = filter_size
      self._strides = self.strides = strides
      self.padding = padding
      self.data_format = data_format
      self._dilation_rate = self.dilation_rate = dilation_rate
      self.W_init = W_init
      self.b_init = b_init
      self.in_channels = in_channels
  
      if self.in_channels:
          self.build(None)
          self._built = True
  
      logging.info(
          "Conv2d %s: n_filter: %d filter_size: %s strides: %s pad: %s act: %s"
          % (
              self.name,
              n_filter,
              str(filter_size),
              str(strides),
              padding,
              self.act.__name__
              if self.act is not None
              else "No Activation",
          )
      )
  
imports: import tensorflow
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias
  from tensorlayer.layers.core import Layer
  from tensorlayer.layers.utils import get_collection_trainable
label_desc: Use image node_id 1 to create a new Conv2d object from inherited base classes: Layer with example: obj = Conv2d(n_filter, filter_size, strides, act, padding, data_format, dilation_rate, W_init, b_init, in_channels, name)