class_docstr: The HRNetW48Contrast implementation based on PaddlePaddle.
  
  The original article refers to
  Wenguan Wang, Tianfei Zhou, et al. "Exploring Cross-Image Pixel Contrast for Semantic Segmentation"
  (https://arxiv.org/abs/2101.11939).
  
  Args:
      bb_channels (int): The output dimensions of backbone.
      num_classes (int): The unique number of target classes.
      backbone (Paddle.nn.Layer): Backbone network, currently support HRNet_W48.
      drop_prob (float): The probability of dropout.
      proj_dim (int): The projection dimensions.
      align_corners (bool, optional): An argument of F.interpolate. It should be set to False when the feature size is even,
          e.g. 1024x512, otherwise it is True, e.g. 769x769. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","HRNetW48Contrast","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Wenguan","Wang",",","Tianfei","Zhou",",","et","al",".","``","Exploring","Cross-Image","Pixel","Contrast","for","Semantic","Segmentation","''","(","https",":","\/\/arxiv.org\/abs\/2101.11939",")",".","Args",":","bb_channels","(","int",")",":","The","output","dimensions","of","backbone",".","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","Paddle.nn.Layer",")",":","Backbone","network",",","currently","support","HRNet_W48",".","drop_prob","(","float",")",":","The","probability","of","dropout",".","proj_dim","(","int",")",":","The","projection","dimensions",".","align_corners","(","bool",",","optional",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","feature","size","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def forward(self, x):
      feats = self.backbone(x)[0]
      out = self.cls_head(feats)
      logit_list = []
      if self.training:
          emb = self.proj_head(feats)
          logit_list.append(
              F.interpolate(
                  out,
                  paddle.shape(x)[2:],
                  mode="bilinear",
                  align_corners=self.align_corners,
              )
          )
          logit_list.append({"seg": out, "embed": emb})
      else:
          logit_list.append(
              F.interpolate(
                  out,
                  paddle.shape(x)[2:],
                  mode="bilinear",
                  align_corners=self.align_corners,
              )
          )
      return logit_list
  
file_path: PaddleSeg/paddleseg/models/hrnet_contrast.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 3 for calling the HRNetW48Contrast obj's underlying member method code with example usage: obj.forward(x) and returns: logit_list