    def forward(self, x, size):
        """forward function"""
        bb, _, cc = x.shape
        hh, ww = size

        feat = x.transpose(1, 2).view(bb, cc, hh, ww)
        x = self.proj(feat) + feat
        x = x.flatten(2).transpose(1, 2)

        return x
forward function
towhee/models/mpvit/mpvit.py