class_docstr: Rearrange elements in a tensor according to an upscaling factor.
  
  Rearranges elements in a tensor of shape :math:`(*, C \times r^2, H, W)`
  to a tensor of shape :math:`(*, C, H \times r, W \times r)`, where r is an upscale factor.
  
  This is useful for implementing efficient sub-pixel convolution
  with a stride of :math:`1/r`.
  
  See the paper:
  `Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network`_
  by Shi et. al (2016) for more details.
  
  Args:
      upscale_factor (int): factor to increase spatial resolution by
  
  Shape:
      - Input: :math:`(*, C_{in}, H_{in}, W_{in})`, where * is zero or more batch dimensions
      - Output: :math:`(*, C_{out}, H_{out}, W_{out})`, where
  
  .. math::
      C_{out} = C_{in} \div \text{upscale\_factor}^2
  
  .. math::
      H_{out} = H_{in} \times \text{upscale\_factor}
  
  .. math::
      W_{out} = W_{in} \times \text{upscale\_factor}
  
  Examples::
  
      >>> pixel_shuffle = nn.PixelShuffle(3)
      >>> input = torch.randn(1, 9, 4, 4)
      >>> output = pixel_shuffle(input)
      >>> print(output.size())
      torch.Size([1, 1, 12, 12])
  
  .. _Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network:
      https://arxiv.org/abs/1609.05158
class_docstr_tok: ["Rearrange","elements","in","a","tensor","according","to","an","upscaling","factor",".","Rearranges","elements","in","a","tensor","of","shape",":","math",":","`","(","*",",","C","\\times","r^2",",","H",",","W",")","`","to","a","tensor","of","shape",":","math",":","`","(","*",",","C",",","H","\\times","r",",","W","\\times","r",")","`",",","where","r","is","an","upscale","factor",".","This","is","useful","for","implementing","efficient","sub-pixel","convolution","with","a","stride","of",":","math",":","`","1\/r","`",".","See","the","paper",":","`","Real-Time","Single","Image","and","Video","Super-Resolution","Using","an","Efficient","Sub-Pixel","Convolutional","Neural","Network","`","_","by","Shi","et",".","al","(","2016",")","for","more","details",".","Args",":","upscale_factor","(","int",")",":","factor","to","increase","spatial","resolution","by","Shape",":","-","Input",":",":","math",":","`","(","*",",","C_","{","in","}",",","H_","{","in","}",",","W_","{","in","}",")","`",",","where","*","is","zero","or","more","batch","dimensions","-","Output",":",":","math",":","`","(","*",",","C_","{","out","}",",","H_","{","out","}",",","W_","{","out","}",")","`",",","where","..","math",":",":","C_","{","out","}","=","C_","{","in","}","\\div","\\text","{","upscale\\_factor","}","^2","..","math",":",":","H_","{","out","}","=","H_","{","in","}","\\times","\\text","{","upscale\\_factor","}","..","math",":",":","W_","{","out","}","=","W_","{","in","}","\\times","\\text","{","upscale\\_factor","}","Examples",":",":",">",">",">","pixel_shuffle","=","nn.PixelShuffle","(","3",")",">",">",">","input","=","torch.randn","(","1",",","9",",","4",",","4",")",">",">",">","output","=","pixel_shuffle","(","input",")",">",">",">","print","(","output.size","(",")",")","torch.Size","(","[","1",",","1",",","12",",","12","]",")","..","_Real-Time","Single","Image","and","Video","Super-Resolution","Using","an","Efficient","Sub-Pixel","Convolutional","Neural","Network",":","https",":","\/\/arxiv.org\/abs\/1609.05158"]
code: def extra_repr(self) -> str:
      return f"upscale_factor={self.upscale_factor}"
  
file_path: pytorch/torch/nn/modules/pixelshuffle.py
imports: from .module import Module
  from ..None import functional
  from torch import Tensor
label_desc: Use image node_id 3 for calling the PixelShuffle obj's underlying member method code with example usage: obj.extra_repr() and returns: str, self