class_docstr: Args:
      dim (int): Number of input channels.
      drop_rate (float): Stochastic depth rate. Default: 0.0
      layer_scale_init_value (float): Init value for Layer Scale. Default: 1e-6.
code: def __init__(
      self,
      dim,
      drop_rate=0.0,
      layer_scale_init_value=1e-6,
      name: str = None,
  ):
      super().__init__(name=name)
      self.layer_scale_init_value = layer_scale_init_value
      self.dwconv = layers.DepthwiseConv2D(
          7,
          padding="same",
          depthwise_initializer=KERNEL_INITIALIZER,
          bias_initializer=BIAS_INITIALIZER,
          name="dwconv",
      )
      self.norm = layers.LayerNormalization(epsilon=1e-6, name="norm")
      self.pwconv1 = layers.Dense(
          4 * dim,
          kernel_initializer=KERNEL_INITIALIZER,
          bias_initializer=BIAS_INITIALIZER,
          name="pwconv1",
      )
      self.act = layers.Activation("gelu")
      self.pwconv2 = layers.Dense(
          dim,
          kernel_initializer=KERNEL_INITIALIZER,
          bias_initializer=BIAS_INITIALIZER,
          name="pwconv2",
      )
      self.drop_path = (
          layers.Dropout(drop_rate, noise_shape=(None, 1, 1, 1))
          if drop_rate > 0
          else None
      )
  
imports: import numpy
  import tensorflow
  from tensorflow.keras import layers, initializers, Model
label_desc: Use image node_id 1 to create a new Block object from inherited base classes: layers with example: obj = Block(dim, drop_rate, layer_scale_init_value, name)