/usr/local/lib64/python3.6/site-packages/torch/nn/modules/__pycache__
NameSizeModeActions
activation.cpython-36.pyc476350644editdlrm
adaptive.cpython-36.pyc97250644editdlrm
batchnorm.cpython-36.pyc310390644editdlrm
channelshuffle.cpython-36.pyc19010644editdlrm
container.cpython-36.pyc279700644editdlrm
conv.cpython-36.pyc577890644editdlrm
distance.cpython-36.pyc36840644editdlrm
dropout.cpython-36.pyc103100644editdlrm
flatten.cpython-36.pyc58130644editdlrm
fold.cpython-36.pyc128070644editdlrm
instancenorm.cpython-36.pyc188080644editdlrm
lazy.cpython-36.pyc116900644editdlrm
linear.cpython-36.pyc101880644editdlrm
loss.cpython-36.pyc914650644editdlrm
module.cpython-36.pyc665300644editdlrm
normalization.cpython-36.pyc113600644editdlrm
padding.cpython-36.pyc222170644editdlrm
pixelshuffle.cpython-36.pyc43980644editdlrm
pooling.cpython-36.pyc532030644editdlrm
rnn.cpython-36.pyc446530644editdlrm
sparse.cpython-36.pyc209560644editdlrm
transformer.cpython-36.pyc207370644editdlrm
upsampling.cpython-36.pyc107800644editdlrm
utils.cpython-36.pyc25280644editdlrm
_functions.cpython-36.pyc54410644editdlrm
__init__.cpython-36.pyc52360644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/nn/modules/__pycache__/pixelshuffle.cpython-36.pyc (4398B)
3 ûEgõ ã@sHddlmZddlmZddlmZGdd„deƒZGdd „d eƒZd S) é)ÚModuleé)Ú functionalé)ÚTensorcsReZdZUdZdgZeeddœ‡fdd„ Zeedœdd „Z e d œd d „Z ‡Z S) Ú PixelShufflea 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 Úupscale_factorN)rÚreturncstt|ƒjƒ||_dS)N)ÚsuperrÚ__init__r)Úselfr)Ú __class__©úI/usr/local/lib64/python3.6/site-packages/torch/nn/modules/pixelshuffle.pyr 0szPixelShuffle.__init__)Úinputr cCstj||jƒS)N)ÚFZ pixel_shuffler)r rrrrÚforward4szPixelShuffle.forward)r cCs dj|jƒS)Nzupscale_factor={})Úformatr)r rrrÚ extra_repr7szPixelShuffle.extra_repr) Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __constants__Úintrr rrÚstrrÚ __classcell__rr)r rrs %rcsReZdZUdZdgZeeddœ‡fdd„ Zeedœdd „Z e d œd d „Z ‡Z S) ÚPixelUnshuffleaòReverses the :class:`~torch.nn.PixelShuffle` operation by rearranging elements in a tensor of shape :math:`(*, C, H \times r, W \times r)` to a tensor of shape :math:`(*, C \times r^2, H, W)`, where r is a downscale factor. 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: downscale_factor (int): factor to decrease 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} \times \text{downscale\_factor}^2 .. math:: H_{out} = H_{in} \div \text{downscale\_factor} .. math:: W_{out} = W_{in} \div \text{downscale\_factor} Examples:: >>> pixel_unshuffle = nn.PixelUnshuffle(3) >>> input = torch.randn(1, 1, 12, 12) >>> output = pixel_unshuffle(input) >>> print(output.size()) torch.Size([1, 9, 4, 4]) .. _Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network: https://arxiv.org/abs/1609.05158 Údownscale_factorN)rr cstt|ƒjƒ||_dS)N)r rr r)r r)r rrr bszPixelUnshuffle.__init__)rr cCstj||jƒS)N)rZpixel_unshuffler)r rrrrrfszPixelUnshuffle.forward)r cCs dj|jƒS)Nzdownscale_factor={})rr)r rrrriszPixelUnshuffle.extra_repr) rrrrrrrr rrrrrrr)r rr;s #rN) ÚmodulerÚrrZtorchrrrrrrrÚs   4