def forward(self, x: Tuple[torch.Tensor]) -> Tuple[torch.Tensor]:
        """Forward function of neck.

        Args:
            x (Tuple[torch.Tensor]): feature map of backbone.

        Returns:
            Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
              - ``avgpooled_x``: Global feature vectors.
              - ``x``: Dense feature vectors.
              - ``avgpooled_x2``: Dense feature vectors for queue.
        """
        assert len(x) == 1
        x = x[0]

        avgpooled_x = self.avgpool(x)
        avgpooled_x = self.mlp(avgpooled_x.view(avgpooled_x.size(0), -1))

        if self.with_pool:
            x = self.pool(x)  # sxs
        x = self.mlp2(x)  # sxs: bxdxsxs
        avgpooled_x2 = self.avgpool2(x)  # 1x1: bxdx1x1
        x = x.view(x.size(0), x.size(1), -1)  # bxdxs^2
        avgpooled_x2 = avgpooled_x2.view(avgpooled_x2.size(0), -1)  # bxd
        return avgpooled_x, x, avgpooled_x2
Forward function of neck.

        Args:
            x (Tuple[torch.Tensor]): feature map of backbone.

        Returns:
            Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
              - ``avgpooled_x``: Global feature vectors.
              - ``x``: Dense feature vectors.
              - ``avgpooled_x2``: Dense feature vectors for queue.
        
mmpretrain/models/necks/densecl_neck.py