class_docstr: Procedure: [N,C,H,W] -> [N,g,C/g,H,W] -> [N,C/g,g,H,w] -> [N,C,H,W].
class_docstr_tok: ["Procedure",":","[","N",",","C",",","H",",","W","]","-",">","[","N",",","g",",","C\/g",",","H",",","W","]","-",">","[","N",",","C\/g",",","g",",","H",",","w","]","-",">","[","N",",","C",",","H",",","W","]","."]
code: def forward(self, x):
      if self.groups == 1:
          return x
  
      N, C, H, W = x.size()
      g = self.groups
      assert C % g == 0, "group size {} is not for channel {}".format(
          g, C
      )
      return (
          x.view(N, g, int(C // g), H, W)
          .permute(0, 2, 1, 3, 4)
          .contiguous()
          .view(N, C, H, W)
      )
  
imports: from __future__ import absolute_import, division, print_function
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the ChannelShuffle obj's underlying member method code with example usage: obj.forward(x) and returns: x, x