class_docstr: Upsample by `scale` from `ni` filters to `nf` (default `ni`), using `nn.PixelShuffle`, `icnr` init,     and `weight_norm`.
class_docstr_tok: ["Upsample","by","`","scale","`","from","`","ni","`","filters","to","`","nf","`","(","default","`","ni","`",")",",","using","`","nn.PixelShuffle","`",",","`","icnr","`","init",",","and","`","weight_norm","`","."]
code: def __init__(
      self,
      ni: int,
      nf: int = None,
      scale: int = 2,
      blur: bool = False,
      leaky: float = None,
      **kwargs,
  ):
      super().__init__()
      nf = ifnone(nf, ni)
      self.conv = custom_conv_layer(
          ni, nf * (scale**2), ks=1, use_activ=False, **kwargs
      )
  
      self.shuf = PixelShuffle(scale)
  
      self.pad = ReplicationPad2d([1, 0, 1, 0])
      self.blur = nn.AvgPool2D(2, stride=1)
      self.relu = (
          nn.LeakyReLU(leaky) if leaky is not None else nn.ReLU()
      )
  
imports: import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.vision.models import resnet101
  from .None import utils
label_desc: Use image node_id 1 to create a new CustomPixelShuffle_ICNR object from inherited base classes: nn with example: obj = CustomPixelShuffle_ICNR(ni, nf, scale, blur, leaky)