class_docstr: Permute the feature map to gather pixels in local groups, and then reverse permutation.
class_docstr_tok: ["Permute","the","feature","map","to","gather","pixels","in","local","groups",",","and","then","reverse","permutation","."]
code: def permute(self, x, size):
      n, h, w, c = size
      qh = h // self.lgs[0]
      ph = self.lgs[0]
      qw = w // self.lgs[0]
      pw = self.lgs[0]
      c = c
  
      x = x.reshape([n, qh, ph, qw, pw, c])
      x = x.transpose([2, 4, 0, 1, 3, 5])
      x = x.reshape([ph * pw, n * qh * qw, c])
      return x
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
  from paddleseg.utils import utils, logger
  from paddleseg.models.backbones.transformer_utils import *
label_desc: Use image node_id 2 for calling the LocalPermuteHelper obj's underlying member method code with example usage: obj.permute(x, size) and returns: x