/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__/dropout.cpython-36.pyc (10310B)
3 Eg"@sddlmZddlmZddlmZGdddeZGdd d eZGd d d eZ Gd d d eZ GdddeZ GdddeZ dS))Module) functional)TensorcsHeZdZUddgZeed eeddfdd Ze d d d Z Z S) _DropoutNdpinplace?FN)rr returncs<tt|j|dks|dkr,tdj|||_||_dS)Nrrz9dropout probability has to be between 0 and 1, but got {})superr__init__ ValueErrorformatrr )selfrr ) __class__D/usr/local/lib64/python3.6/site-packages/torch/nn/modules/dropout.pyr s z_DropoutNd.__init__)r cCsdj|j|jS)Nzp={}, inplace={})rrr )rrrr extra_reprsz_DropoutNd.extra_repr)r F) __name__ __module__ __qualname__Z __constants__floatrboolr r strr __classcell__rr)rrrs rc@s eZdZdZeedddZdS)DropoutaDuring training, randomly zeroes some of the elements of the input tensor with probability :attr:`p` using samples from a Bernoulli distribution. Each channel will be zeroed out independently on every forward call. This has proven to be an effective technique for regularization and preventing the co-adaptation of neurons as described in the paper `Improving neural networks by preventing co-adaptation of feature detectors`_ . Furthermore, the outputs are scaled by a factor of :math:`\frac{1}{1-p}` during training. This means that during evaluation the module simply computes an identity function. Args: p: probability of an element to be zeroed. Default: 0.5 inplace: If set to ``True``, will do this operation in-place. Default: ``False`` Shape: - Input: :math:`(*)`. Input can be of any shape - Output: :math:`(*)`. Output is of the same shape as input Examples:: >>> m = nn.Dropout(p=0.2) >>> input = torch.randn(20, 16) >>> output = m(input) .. _Improving neural networks by preventing co-adaptation of feature detectors: https://arxiv.org/abs/1207.0580 )inputr cCstj||j|j|jS)N)FZdropoutrtrainingr )rrrrrforward9szDropout.forwardN)rrr__doc__rr rrrrrsrc@s eZdZdZeedddZdS) Dropout2daRandomly zero out entire channels (a channel is a 2D feature map, e.g., the :math:`j`-th channel of the :math:`i`-th sample in the batched input is a 2D tensor :math:`\text{input}[i, j]`). Each channel will be zeroed out independently on every forward call with probability :attr:`p` using samples from a Bernoulli distribution. Usually the input comes from :class:`nn.Conv2d` modules. As described in the paper `Efficient Object Localization Using Convolutional Networks`_ , if adjacent pixels within feature maps are strongly correlated (as is normally the case in early convolution layers) then i.i.d. dropout will not regularize the activations and will otherwise just result in an effective learning rate decrease. In this case, :func:`nn.Dropout2d` will help promote independence between feature maps and should be used instead. Args: p (float, optional): probability of an element to be zero-ed. inplace (bool, optional): If set to ``True``, will do this operation in-place Shape: - Input: :math:`(N, C, H, W)` or :math:`(C, H, W)`. - Output: :math:`(N, C, H, W)` or :math:`(C, H, W)` (same shape as input). Examples:: >>> m = nn.Dropout2d(p=0.2) >>> input = torch.randn(20, 16, 32, 32) >>> output = m(input) .. _Efficient Object Localization Using Convolutional Networks: https://arxiv.org/abs/1411.4280 )rr cCstj||j|j|jS)N)rZ dropout2drrr )rrrrrr cszDropout2d.forwardN)rrrr!rr rrrrr"=s$r"c@s eZdZdZeedddZdS) Dropout3daRandomly zero out entire channels (a channel is a 3D feature map, e.g., the :math:`j`-th channel of the :math:`i`-th sample in the batched input is a 3D tensor :math:`\text{input}[i, j]`). Each channel will be zeroed out independently on every forward call with probability :attr:`p` using samples from a Bernoulli distribution. Usually the input comes from :class:`nn.Conv3d` modules. As described in the paper `Efficient Object Localization Using Convolutional Networks`_ , if adjacent pixels within feature maps are strongly correlated (as is normally the case in early convolution layers) then i.i.d. dropout will not regularize the activations and will otherwise just result in an effective learning rate decrease. In this case, :func:`nn.Dropout3d` will help promote independence between feature maps and should be used instead. Args: p (float, optional): probability of an element to be zeroed. inplace (bool, optional): If set to ``True``, will do this operation in-place Shape: - Input: :math:`(N, C, D, H, W)` or :math:`(C, D, H, W)`. - Output: :math:`(N, C, D, H, W)` or :math:`(C, D, H, W)` (same shape as input). Examples:: >>> m = nn.Dropout3d(p=0.2) >>> input = torch.randn(20, 16, 4, 32, 32) >>> output = m(input) .. _Efficient Object Localization Using Convolutional Networks: https://arxiv.org/abs/1411.4280 )rr cCstj||j|j|jS)N)rZ dropout3drrr )rrrrrr szDropout3d.forwardN)rrrr!rr rrrrr#gs$r#c@s eZdZdZeedddZdS) AlphaDropoutaApplies Alpha Dropout over the input. Alpha Dropout is a type of Dropout that maintains the self-normalizing property. For an input with zero mean and unit standard deviation, the output of Alpha Dropout maintains the original mean and standard deviation of the input. Alpha Dropout goes hand-in-hand with SELU activation function, which ensures that the outputs have zero mean and unit standard deviation. During training, it randomly masks some of the elements of the input tensor with probability *p* using samples from a bernoulli distribution. The elements to masked are randomized on every forward call, and scaled and shifted to maintain zero mean and unit standard deviation. During evaluation the module simply computes an identity function. More details can be found in the paper `Self-Normalizing Neural Networks`_ . Args: p (float): probability of an element to be dropped. Default: 0.5 inplace (bool, optional): If set to ``True``, will do this operation in-place Shape: - Input: :math:`(*)`. Input can be of any shape - Output: :math:`(*)`. Output is of the same shape as input Examples:: >>> m = nn.AlphaDropout(p=0.2) >>> input = torch.randn(20, 16) >>> output = m(input) .. _Self-Normalizing Neural Networks: https://arxiv.org/abs/1706.02515 )rr cCstj||j|jS)N)rZ alpha_dropoutrr)rrrrrr szAlphaDropout.forwardN)rrrr!rr rrrrr$s$r$c@s eZdZdZeedddZdS)FeatureAlphaDropoutaRandomly masks out entire channels (a channel is a feature map, e.g. the :math:`j`-th channel of the :math:`i`-th sample in the batch input is a tensor :math:`\text{input}[i, j]`) of the input tensor). Instead of setting activations to zero, as in regular Dropout, the activations are set to the negative saturation value of the SELU activation function. More details can be found in the paper `Self-Normalizing Neural Networks`_ . Each element will be masked independently for each sample on every forward call with probability :attr:`p` using samples from a Bernoulli distribution. The elements to be masked are randomized on every forward call, and scaled and shifted to maintain zero mean and unit variance. Usually the input comes from :class:`nn.AlphaDropout` modules. As described in the paper `Efficient Object Localization Using Convolutional Networks`_ , if adjacent pixels within feature maps are strongly correlated (as is normally the case in early convolution layers) then i.i.d. dropout will not regularize the activations and will otherwise just result in an effective learning rate decrease. In this case, :func:`nn.AlphaDropout` will help promote independence between feature maps and should be used instead. Args: p (float, optional): probability of an element to be zeroed. Default: 0.5 inplace (bool, optional): If set to ``True``, will do this operation in-place Shape: - Input: :math:`(N, C, D, H, W)` or :math:`(C, D, H, W)`. - Output: :math:`(N, C, D, H, W)` or :math:`(C, D, H, W)` (same shape as input). Examples:: >>> m = nn.FeatureAlphaDropout(p=0.2) >>> input = torch.randn(20, 16, 4, 32, 32) >>> output = m(input) .. _Self-Normalizing Neural Networks: https://arxiv.org/abs/1706.02515 .. _Efficient Object Localization Using Convolutional Networks: https://arxiv.org/abs/1411.4280 )rr cCstj||j|jS)N)rZfeature_alpha_dropoutrr)rrrrrr szFeatureAlphaDropout.forwardN)rrrr!rr rrrrr%s+r%N) modulerrrZtorchrrrr"r#r$r%rrrrs   %***