class_docstr: ConvNeXt Block. There are two equivalent implementations:
  (1) DwConv -> LayerNorm (channels_first) -> 1x1 Conv -> GELU -> 1x1 Conv; all in (N, C, H, W)
  (2) DwConv -> Permute to (N, H, W, C); LayerNorm (channels_last) -> Linear -> GELU -> Linear; Permute back
  We use (2) as we find it slightly faster in Pypaddle
  
  Args:
      dim (int): Number of input channels.
      drop_path (float): Stochastic depth rate. Default: 0.0
      layer_scale_init_value (float): Init value for Layer Scale. Default: 1e-6.
class_docstr_tok: ["ConvNeXt","Block",".","There","are","two","equivalent","implementations",":","(","1",")","DwConv","-",">","LayerNorm","(","channels_first",")","-",">","1x1","Conv","-",">","GELU","-",">","1x1","Conv",";","all","in","(","N",",","C",",","H",",","W",")","(","2",")","DwConv","-",">","Permute","to","(","N",",","H",",","W",",","C",")",";","LayerNorm","(","channels_last",")","-",">","Linear","-",">","GELU","-",">","Linear",";","Permute","back","We","use","(","2",")","as","we","find","it","slightly","faster","in","Pypaddle","Args",":","dim","(","int",")",":","Number","of","input","channels",".","drop_path","(","float",")",":","Stochastic","depth","rate",".","Default",":","0.0","layer_scale_init_value","(","float",")",":","Init","value","for","Layer","Scale",".","Default",":","1e-6","."]
code: def forward(self, x):
      input = x
      x = self.dwconv(x)
      x = x.transpose([0, 2, 3, 1])
      x = self.norm(x)
      x = self.pwconv1(x)
      x = self.act(x)
      x = self.pwconv2(x)
      if self.gamma is not None:
          x = self.gamma * x
      x = x.transpose([0, 3, 1, 2])
      x = input + self.drop_path(x)
      return x
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.nn.initializer import Constant
  import numpy
  from ppdet.core.workspace import register, serializable
  from ..shape_spec import ShapeSpec
  from .transformer_utils import DropPath, trunc_normal_, zeros_
label_desc: Use image node_id 2 for calling the Block obj's underlying member method code with example usage: obj.forward(x) and returns: x