class_docstr: OCNet
  
  Parameters
  ----------
  nclass : int
      Number of categories for the training dataset.
  backbone : string
      Pre-trained dilated backbone network type (default:'resnet50'; 'resnet50',
      'resnet101' or 'resnet152').
  norm_layer : object
      Normalization layer used in backbone network (default: :class:`nn.BatchNorm`;
      for Synchronized Cross-GPU BachNormalization).
  aux : bool
      Auxiliary loss.
  Reference:
      Yuhui Yuan, Jingdong Wang. "OCNet: Object Context Network for Scene Parsing."
      arXiv preprint arXiv:1809.00916 (2018).
class_docstr_tok: ["OCNet","Parameters","--","--","--","--","--","nclass",":","int","Number","of","categories","for","the","training","dataset",".","backbone",":","string","Pre-trained","dilated","backbone","network","type","(","default",":","'resnet50","'",";","'resnet50","'",",","'resnet101","'","or","'resnet152","'",")",".","norm_layer",":","object","Normalization","layer","used","in","backbone","network","(","default",":",":","class",":","`","nn.BatchNorm","`",";","for","Synchronized","Cross-GPU","BachNormalization",")",".","aux",":","bool","Auxiliary","loss",".","Reference",":","Yuhui","Yuan",",","Jingdong","Wang",".","``","OCNet",":","Object","Context","Network","for","Scene","Parsing",".","''","arXiv","preprint","arXiv:1809.00916","(","2018",")","."]
code: def __init__(
      self,
      num_classes,
      pretrained=True,
      backbone="resnet101",
      oc_arch="base",
      aux=False,
      **kwargs,
  ):
      super(OCNet, self).__init__(
          num_classes,
          pretrained=pretrained,
          aux=aux,
          backbone=backbone,
          **kwargs,
      )
      self.head = _OCHead(num_classes, oc_arch, **kwargs)
      if self.aux:
          self.auxlayer = _FCNHead(1024, num_classes, **kwargs)
  
      self.__setattr__(
          "exclusive", ["head", "auxlayer"] if aux else ["head"]
      )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from pywick.models.segmentation.da_basenets.segbase import SegBaseModel
  from pywick.models.segmentation.da_basenets.fcn import _FCNHead
label_desc: Use image node_id 1 to create a new OCNet object from inherited base classes: SegBaseModel with example: obj = OCNet(num_classes, pretrained, backbone, oc_arch, aux)