docstr: Multi-path 4-Cascaded RefineNet for image segmentation with improved pooling
  
  Args:
      input_shape ((int, int)): (channel, size) assumes input has
          equal height and width
      refinenet_block (block): RefineNet Block
      num_classes (int, optional): number of classes
      features (int, optional): number of features in refinenet
      resnet_factory (func, optional): A Resnet model from torchvision.
          Default: models.resnet101
      pretrained (bool, optional): Use pretrained version of resnet
          Default: True
      freeze_resnet (bool, optional): Freeze resnet model
          Default: True
  
  Raises:
      ValueError: size of input_shape not divisible by 32
docstr_tok: ["Multi-path","4-Cascaded","RefineNet","for","image","segmentation","with","improved","pooling","Args",":","input_shape","(","(","int",",","int",")",")",":","(","channel",",","size",")","assumes","input","has","equal","height","and","width","refinenet_block","(","block",")",":","RefineNet","Block","num_classes","(","int",",","optional",")",":","number","of","classes","features","(","int",",","optional",")",":","number","of","features","in","refinenet","resnet_factory","(","func",",","optional",")",":","A","Resnet","model","from","torchvision",".","Default",":","models.resnet101","pretrained","(","bool",",","optional",")",":","Use","pretrained","version","of","resnet","Default",":","True","freeze_resnet","(","bool",",","optional",")",":","Freeze","resnet","model","Default",":","True","Raises",":","ValueError",":","size","of","input_shape","not","divisible","by","32"]
code: def __init__(
      self,
      num_classes=1,
      pretrained=True,
      input_shape=(1, 512),
      features=256,
      resnet_factory=models.resnet101,
      freeze_resnet=False,
      **kwargs,
  ):
      """Multi-path 4-Cascaded RefineNet for image segmentation with improved pooling
  
      Args:
          input_shape ((int, int)): (channel, size) assumes input has
              equal height and width
          refinenet_block (block): RefineNet Block
          num_classes (int, optional): number of classes
          features (int, optional): number of features in refinenet
          resnet_factory (func, optional): A Resnet model from torchvision.
              Default: models.resnet101
          pretrained (bool, optional): Use pretrained version of resnet
              Default: True
          freeze_resnet (bool, optional): Freeze resnet model
              Default: True
  
      Raises:
          ValueError: size of input_shape not divisible by 32
      """
      super().__init__(
          input_shape,
          RefineNetBlockImprovedPooling,
          num_classes=num_classes,
          features=features,
          resnet_factory=resnet_factory,
          pretrained=pretrained,
          freeze_resnet=freeze_resnet,
          **kwargs,
      )
  
file_path: pywick/pywick/models/segmentation/refinenet/refinenet.py
imports: import torch.nn
  import torchvision.models
  import torch.nn.functional
  from .blocks import RefineNetBlock, ResidualConvUnit, RefineNetBlockImprovedPooling
label_desc: Use image node_id 1 to create a new RefineNet4CascadePoolingImproved object from inherited base classes: BaseRefineNet4Cascade with example: obj = RefineNet4CascadePoolingImproved(num_classes, pretrained, input_shape, features, resnet_factory, freeze_resnet)