torch.float_powertorch.float_power(input, exponent, , out=None) -> Tensor
   Raises "input" to the power of "exponent", elementwise, in double
   precision. If neither input is complex returns a "torch.float64"
   tensor, and if one or more inputs is complex returns a
   "torch.complex128" tensor.
   Note:
     This function always computes in double precision, unlike
     "torch.pow()", which implements more typical type promotion. This
     is useful when the computation needs to be performed in a wider
     or more precise dtype, or the results of the computation may
     contain fractional values not representable in the input dtypes,
     like when an integer base is raised to a negative integer
     exponent.
   Parameters:
      * input (Tensor or Number) -- the base value(s)
      * exponent (Tensor or Number) -- the exponent value(s)
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:


Example:
      >>> a = torch.randint(10, (4,))
      >>> a
      tensor([6, 4, 7, 1])
      >>> torch.float_power(a, 2)
      tensor([36., 16., 49.,  1.], dtype=torch.float64)
      >>> a = torch.arange(1, 5)
      >>> a
      tensor([ 1,  2,  3,  4])
      >>> exp = torch.tensor([2, -3, 4, -5])
      >>> exp
      tensor([ 2, -3,  4, -5])
      >>> torch.float_power(a, exp)
      tensor([1.0000e+00, 1.2500e-01, 8.1000e+01, 9.7656e-04], dtype=torch.float64)


ConvReLU2dclass torch.ao.nn.intrinsic.ConvReLU2d(conv, relu)
   This is a sequential container which calls the Conv2d and ReLU
   modules. During quantization this will be replaced with the
   corresponding fused module.


torch.istfttorch.istft(input, n_fft, hop_length=None, win_length=None, window=None, center=True, normalized=False, onesided=None, length=None, return_complex=False) -> Tensor:
   Inverse short time Fourier Transform. This is expected to be the
   inverse of "stft()".
   It has the same parameters (+ additional optional parameter of
   "length") and it should return the least squares estimation of the
   original signal. The algorithm will check using the NOLA condition
   ( nonzero overlap).
   Important consideration in the parameters "window" and "center" so
   that the envelop created by the summation of all the windows is
   never zero at certain point in time. Specifically,
   \sum_{t=-\infty}^{\infty} |w|^2[n-t\times hop_length] \cancel{=}
   0.
   Since "stft()" discards elements at the end of the signal if they
   do not fit in a frame, "istft" may return a shorter signal than the
   original signal (can occur if "center" is False since the signal


isn't padded). If length is given in the arguments and is longer
   than expected, "istft" will pad zeros to the end of the returned
   signal.
   If "center" is "True", then there will be padding e.g.
   "'constant'", "'reflect'", etc. Left padding can be trimmed off
   exactly because they can be calculated but right padding cannot be
   calculated without additional information.
   Example: Suppose the last window is: "[17, 18, 0, 0, 0]" vs "[18,
   0, 0, 0, 0]"
   The "n_fft", "hop_length", "win_length" are all the same which
   prevents the calculation of right padding. These additional values
   could be zeros or a reflection of the signal so providing "length"
   could be useful. If "length" is "None" then padding will be
   aggressively removed (some loss of signal).
   [1] D. W. Griffin and J. S. Lim, "Signal estimation from modified
   short-time Fourier transform," IEEE Trans. ASSP, vol.32, no.2,
   pp.236-243, Apr. 1984.
   Parameters:
      * input (Tensor) --


Parameters:
      * input (Tensor) --
        The input tensor. Expected to be in the format of "stft()",
        output. That is a complex tensor of shape ("channel",
        "fft_size", "n_frame"), where the "channel" dimension is
        optional.
        Changed in version 2.0: Real datatype inputs are no longer
        supported. Input must now have a complex datatype, as returned
        by "stft(..., return_complex=True)".
      * n_fft (int) -- Size of Fourier transform
      * hop_length (Optional[int]) -- The distance between
        neighboring sliding window frames. (Default: "n_fft // 4")
      * win_length (Optional[int]) -- The size of window
        frame and STFT filter. (Default: "n_fft")
      * window (Optional[torch.Tensor]) -- The optional
        window function. (Default: "torch.ones(win_length)")
      * center (bool) -- Whether "input" was padded on both
        sides so that the t-th frame is centered at time t \times


\text{hop_length}. (Default: "True")
      * normalized (bool) -- Whether the STFT was normalized.
        (Default: "False")
      * onesided (Optional[bool]) -- Whether the STFT was
        onesided. (Default: "True" if "n_fft != fft_size" in the input
        size)
      * length (Optional[int]) -- The amount to trim the
        signal by (i.e. the original signal length). (Default: whole
        signal)
      * return_complex (Optional[bool]) -- Whether the
        output should be complex, or if the input should be assumed to
        derive from a real signal and window. Note that this is
        incompatible with "onesided=True". (Default: "False")
   Returns:
      Least squares estimation of the original signal of size (...,
      signal_length)
   Return type:
      Tensor


Softmaxclass torch.nn.Softmax(dim=None)
   Applies the Softmax function to an n-dimensional input Tensor
   rescaling them so that the elements of the n-dimensional output
   Tensor lie in the range [0,1] and sum to 1.
   Softmax is defined as:
      \text{Softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)}
   When the input Tensor is a sparse tensor then the unspecified
   values are treated as "-inf".
   Shape:
      * Input: () where *** means, any number of additional
        dimensions
      * Output: (), same shape as the input
   Returns:
      a Tensor of the same dimension and shape as the input with
      values in the range [0, 1]
   Parameters:
      dim (int) -- A dimension along which Softmax will be
      computed (so every slice along dim will sum to 1).
   Return type:
      None
   Note:
     This module doesn't work directly with NLLLoss, which expects the
     Log to be computed between the Softmax and itself. Use


LogSoftmax instead (it's faster and has better numerical
     properties).
   Examples:
      >>> m = nn.Softmax(dim=1)
      >>> input = torch.randn(2, 3)
      >>> output = m(input)


torch.empty_liketorch.empty_like(input, , dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) -> Tensor
   Returns an uninitialized tensor with the same size as "input".
   "torch.empty_like(input)" is equivalent to
   "torch.empty(input.size(), dtype=input.dtype, layout=input.layout,
   device=input.device)".
   Parameters:
      input (Tensor) -- the size of "input" will determine size
      of the output tensor.
   Keyword Arguments:
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned Tensor. Default: if "None", defaults to the dtype
        of "input".
      * layout ("torch.layout", optional) -- the desired layout of
        returned tensor. Default: if "None", defaults to the layout of
        "input".
      * device* ("torch.device", optional) -- the desired device of
        returned tensor. Default: if "None", defaults to the device of
        "input".


"input".
      * requires_grad (bool, optional) -- If autograd should
        record operations on the returned tensor. Default: "False".
      * memory_format ("torch.memory_format", optional) -- the
        desired memory format of returned Tensor. Default:
        "torch.preserve_format".
   Example:
      >>> a=torch.empty((2,3), dtype=torch.int32, device = 'cuda')
      >>> torch.empty_like(a)
      tensor([[0, 0, 0],
              [0, 0, 0]], device='cuda:0', dtype=torch.int32)


torch.linalg.matrix_exptorch.linalg.matrix_exp(A) -> Tensor
   Computes the matrix exponential of a square matrix.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, this function
   computes the matrix exponential of A \in \mathbb{K}^{n \times
   n}, which is defined as
      \mathrm{matrix_exp}(A) = \sum_{k=0}^\infty \frac{1}{k!}A^k \in
      \mathbb{K}^{n \times n}.
   If the matrix A has eigenvalues \lambda_i \in \mathbb{C}, the
   matrix \mathrm{matrix_exp}(A) has eigenvalues e^{\lambda_i} \in
   \mathbb{C}.
   Supports input of bfloat16, float, double, cfloat and cdouble
   dtypes. Also supports batches of matrices, and if "A" is a batch of
   matrices then the output has the same batch dimensions.
   Parameters:
      A (Tensor) -- tensor of shape (, n, n)* where *** is
      zero or more batch dimensions.
   Example:
      >>> A = torch.empty(2, 2, 2)
      >>> A[0, :, :] = torch.eye(2, 2)
      >>> A[1, :, :] = 2 * torch.eye(2, 2)
      >>> A


A
      tensor([[[1., 0.],
               [0., 1.]],
              [[2., 0.],
               [0., 2.]]])
      >>> torch.linalg.matrix_exp(A)
      tensor([[[2.7183, 0.0000],
               [0.0000, 2.7183]],
               [[7.3891, 0.0000],
                [0.0000, 7.3891]]])
      >>> import math
      >>> A = torch.tensor([[0, math.pi/3], [-math.pi/3, 0]]) # A is skew-symmetric
      >>> torch.linalg.matrix_exp(A) # matrix_exp(A) = [[cos(pi/3), sin(pi/3)], [-sin(pi/3), cos(pi/3)]]
      tensor([[ 0.5000,  0.8660],
              [-0.8660,  0.5000]])


torch.jit.unusedtorch.jit.unused(fn)
   This decorator indicates to the compiler that a function or method
   should be ignored and replaced with the raising of an exception.
   This allows you to leave code in your model that is not yet
   TorchScript compatible and still export your model.
      Example (using "@torch.jit.unused" on a method):
         import torch
         import torch.nn as nn
         class MyModule(nn.Module):
             def init(self, use_memory_efficient):
                 super(MyModule, self).init()
                 self.use_memory_efficient = use_memory_efficient
             @torch.jit.unused
             def memory_efficient(self, x):
                 import pdb
                 pdb.set_trace()
                 return x + 10
             def forward(self, x):
                 # Use not-yet-scriptable memory efficient mode
                 if self.use_memory_efficient:
                     return self.memory_efficient(x)
                 else:


else:
                     return x + 10
         m = torch.jit.script(MyModule(use_memory_efficient=False))
         m.save("m.pt")
         m = torch.jit.script(MyModule(use_memory_efficient=True))
         # exception raised
         m(torch.rand(100))


FXFloatFunctionalclass torch.ao.nn.quantized.FXFloatFunctional
   module to replace FloatFunctional module before FX graph mode
   quantization, since activation_post_process will be inserted in top
   level module directly
   Valid operation names:
      * add
      * cat
      * mul
      * add_relu
      * add_scalar
      * mul_scalar


fuse_modulesclass torch.quantization.fuse_modules(model, modules_to_fuse, inplace=False, fuser_func=, fuse_custom_config_dict=None)
   Fuses a list of modules into a single module
   Fuses only the following sequence of modules: conv, bn conv, bn,
   relu conv, relu linear, relu bn, relu All other sequences are left
   unchanged. For these sequences, replaces the first item in the list
   with the fused module, replacing the rest of the modules with
   identity.
   Parameters:
      * model -- Model containing the modules to be fused
      * modules_to_fuse -- list of list of module names to fuse.
        Can also be a list of strings if there is only a single list
        of modules to fuse.
      * inplace -- bool specifying if fusion happens in place on
        the model, by default a new model is returned
      * fuser_func -- Function that takes in a list of modules and
        outputs a list of fused modules of the same length. For


example, fuser_func([convModule, BNModule]) returns the list
        [ConvBNModule, nn.Identity()] Defaults to
        torch.ao.quantization.fuse_known_modules
      * fuse_custom_config_dict -- custom configuration for fusion
      # Example of fuse_custom_config_dict
      fuse_custom_config_dict = {
          # Additional fuser_method mapping
          "additional_fuser_method_mapping": {
              (torch.nn.Conv2d, torch.nn.BatchNorm2d): fuse_conv_bn
          },
      }
   Returns:
      model with fused modules. A new copy is created if inplace=True.
   Examples:
      >>> m = M().eval()
      >>> # m is a module containing the sub-modules below
      >>> modules_to_fuse = [ ['conv1', 'bn1', 'relu1'], ['submodule.conv', 'submodule.relu']]
      >>> fused_m = torch.ao.quantization.fuse_modules(m, modules_to_fuse)
      >>> output = fused_m(input)
      >>> m = M().eval()
      >>> # Alternately provide a single list of modules to fuse
      >>> modules_to_fuse = ['conv1', 'bn1', 'relu1']


fused_m = torch.ao.quantization.fuse_modules(m, modules_to_fuse)
      >>> output = fused_m(input)


torch.roundtorch.round(input, , decimals=0, out=None) -> Tensor
   Rounds elements of "input" to the nearest integer.
   For integer inputs, follows the array-api convention of returning a
   copy of the input tensor.
   Note:
     This function implements the "round half to even" to break ties
     when a number is equidistant from two integers (e.g. round(2.5)
     is 2).When the :attr:decimals argument is specified the
     algorithm used is similar to NumPy's around. This algorithm is
     fast but inexact and it can easily overflow for low precision
     dtypes. Eg. round(tensor([10000], dtype=torch.float16),
     decimals=3) is inf.
   See also:
     "torch.ceil()", which rounds up. "torch.floor()", which rounds
     down. "torch.trunc()", which rounds towards zero.
   Parameters:
      * input (Tensor) -- the input tensor.
      * decimals (int*) -- Number of decimal places to round to
        (default: 0). If decimals is negative, it specifies the number


of positions to the left of the decimal point.
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   Example:
      >>> torch.round(torch.tensor((4.7, -2.3, 9.1, -7.7)))
      tensor([ 5.,  -2.,  9., -8.])
      >>> # Values equidistant from two integers are rounded towards the
      >>> #   the nearest even value (zero is treated as even)
      >>> torch.round(torch.tensor([-0.5, 0.5, 1.5, 2.5]))
      tensor([-0., 0., 2., 2.])
      >>> # A positive decimals argument rounds to the to that decimal place
      >>> torch.round(torch.tensor([0.1234567]), decimals=3)
      tensor([0.1230])
      >>> # A negative decimals argument rounds to the left of the decimal
      >>> torch.round(torch.tensor([1200.1234567]), decimals=-3)
      tensor([1000.])


torch.is_tensortorch.is_tensor(obj)
   Returns True if obj is a PyTorch tensor.
   Note that this function is simply doing "isinstance(obj, Tensor)".
   Using that "isinstance" check is better for typechecking with mypy,
   and more explicit - so it's recommended to use that instead of
   "is_tensor".
   Parameters:
      obj (Object) -- Object to test
   Example:
      >>> x = torch.tensor([1, 2, 3])
      >>> torch.is_tensor(x)
      True


torch._foreach_sintorch._foreach_sin(self: List[Tensor]) -> List[Tensor]
   Apply "torch.sin()" to each Tensor of the input list.


FractionalMaxPool2dclass torch.nn.FractionalMaxPool2d(kernel_size, output_size=None, output_ratio=None, return_indices=False, _random_samples=None)
   Applies a 2D fractional max pooling over an input signal composed
   of several input planes.
   Fractional MaxPooling is described in detail in the paper
   Fractional MaxPooling by Ben Graham
   The max-pooling operation is applied in kH \times kW regions by a
   stochastic step size determined by the target output size. The
   number of output features is equal to the number of input planes.
   Parameters:
      * kernel_size (Union[int, Tuple[int,
        int]]) -- the size of the window to take a max over.
        Can be a single number k (for a square kernel of k x k) or a
        tuple (kh, kw)
      * output_size (Union[int, Tuple[int,
        int]]) -- the target output size of the image of the
        form oH x oW. Can be a tuple (oH, oW) or a single number


oH for a square image oH x oH
      * output_ratio (Union[float, Tuple[float,
        float]]) -- If one wants to have an output size as a
        ratio of the input size, this option can be given. This has to
        be a number or tuple in the range (0, 1)
      * return_indices (bool) -- if "True", will return the
        indices along with the outputs. Useful to pass to
        "nn.MaxUnpool2d()". Default: "False"
   Shape:
      * Input: (N, C, H_{in}, W_{in}) or (C, H_{in}, W_{in}).
      * Output: (N, C, H_{out}, W_{out}) or (C, H_{out}, W_{out}),
        where (H_{out}, W_{out})=\text{output_size} or (H_{out},
        W_{out})=\text{output_ratio} \times (H_{in}, W_{in}).
   -[ Examples ]-

pool of square window of size=3, and target output size 13x12
m = nn.FractionalMaxPool2d(3, output_size=(13, 12))
pool of square window and target output size being half of input image size


m = nn.FractionalMaxPool2d(3, output_ratio=(0.5, 0.5))
input = torch.randn(20, 16, 50, 32)
output = m(input)


torch.repeat_interleavetorch.repeat_interleave(input, repeats, dim=None, , output_size=None) -> Tensor
   Repeat elements of a tensor.
   Warning:
     This is different from "torch.Tensor.repeat()" but similar to
     "numpy.repeat".
   Parameters:
      * input (Tensor) -- the input tensor.
      * repeats (Tensor or int) -- The number of repetitions
        for each element. repeats is broadcasted to fit the shape of
        the given axis.
      * dim (int, optional) -- The dimension along which to
        repeat values. By default, use the flattened input array, and
        return a flat output array.
   Keyword Arguments:
      output_size (int, optional*) -- Total output size for
      the given axis ( e.g. sum of repeats). If given, it will avoid
      stream synchronization needed to calculate output shape of the
      tensor.
   Returns:
      Repeated tensor which has the same shape as input, except along
      the given axis.


the given axis.
   Return type:
      Tensor
   Example:
      >>> x = torch.tensor([1, 2, 3])
      >>> x.repeat_interleave(2)
      tensor([1, 1, 2, 2, 3, 3])
      >>> y = torch.tensor([[1, 2], [3, 4]])
      >>> torch.repeat_interleave(y, 2)
      tensor([1, 1, 2, 2, 3, 3, 4, 4])
      >>> torch.repeat_interleave(y, 3, dim=1)
      tensor([[1, 1, 1, 2, 2, 2],
              [3, 3, 3, 4, 4, 4]])
      >>> torch.repeat_interleave(y, torch.tensor([1, 2]), dim=0)
      tensor([[1, 2],
              [3, 4],
              [3, 4]])
      >>> torch.repeat_interleave(y, torch.tensor([1, 2]), dim=0, output_size=3)
      tensor([[1, 2],
              [3, 4],
              [3, 4]])
   torch.repeat_interleave(repeats, , output_size=None) -> Tensor
   If the repeats is tensor([n1, n2, n3, ...]), then the output
   will be tensor([0, 0, ..., 1, 1, ..., 2, 2, ..., ...]) where 0
   appears n1 times, 1 appears n2 times, 2 appears n3* times,
   etc.


torch.cuda.is_availabletorch.cuda.is_available()
   Returns a bool indicating if CUDA is currently available.
   Return type:
      bool


torch.Tensor.normTensor.norm(p='fro', dim=None, keepdim=False, dtype=None)
   See "torch.norm()"


torch.Tensor.arccoshTensor.arccosh()
   acosh() -> Tensor
   See "torch.arccosh()"


torch.Tensor.nelementTensor.nelement() -> int
   Alias for "numel()"


torch.nn.functional.relutorch.nn.functional.relu(input, inplace=False) -> Tensor
   Applies the rectified linear unit function element-wise. See "ReLU"
   for more details.
   Return type:
      Tensor


torch.sym_maxtorch.sym_max(a, b)
   SymInt-aware utility for max().


torch.clamptorch.clamp(input, min=None, max=None, , out=None) -> Tensor
   Clamps all elements in "input" into the range [ "min", "max" ].
   Letting min_value and max_value be "min" and "max", respectively,
   this returns:
      y_i = \min(\max(x_i, \text{min_value}_i), \text{max_value}_i)
   If "min" is "None", there is no lower bound. Or, if "max" is "None"
   there is no upper bound.
   Note:
     If "min" is greater than "max" "torch.clamp(..., min, max)" sets
     all elements in "input" to the value of "max".
   Parameters:
      * input (Tensor) -- the input tensor.
      * min (Number or Tensor, optional) -- lower-bound
        of the range to be clamped to
      * max (Number or Tensor, optional) -- upper-bound
        of the range to be clamped to
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(4)
      >>> a
      tensor([-1.7120,  0.1734, -0.0478, -0.0922])


tensor([-1.7120,  0.1734, -0.0478, -0.0922])
      >>> torch.clamp(a, min=-0.5, max=0.5)
      tensor([-0.5000,  0.1734, -0.0478, -0.0922])
      >>> min = torch.linspace(-1, 1, steps=4)
      >>> torch.clamp(a, min=min)
      tensor([-1.0000,  0.1734,  0.3333,  1.0000])


torch.Tensor.modeTensor.mode(dim=None, keepdim=False)
   See "torch.mode()"


L1Unstructuredclass torch.nn.utils.prune.L1Unstructured(amount)
   Prune (currently unpruned) units in a tensor by zeroing out the
   ones with the lowest L1-norm.
   Parameters:
      amount (int or float) -- quantity of parameters to
      prune. If "float", should be between 0.0 and 1.0 and represent
      the fraction of parameters to prune. If "int", it represents the
      absolute number of parameters to prune.
   classmethod apply(module, name, amount, importance_scores=None)
      Adds the forward pre-hook that enables pruning on the fly and
      the reparametrization of a tensor in terms of the original
      tensor and the pruning mask.
      Parameters:
         * module (nn.Module) -- module containing the tensor to
           prune
         * name (str) -- parameter name within "module" on which
           pruning will act.
         * amount (int or float) -- quantity of parameters
           to prune. If "float", should be between 0.0 and 1.0 and


represent the fraction of parameters to prune. If "int", it
           represents the absolute number of parameters to prune.
         * importance_scores (torch.Tensor) -- tensor of
           importance scores (of same shape as module parameter) used
           to compute mask for pruning. The values in this tensor
           indicate the importance of the corresponding elements in
           the parameter being pruned. If unspecified or None, the
           module parameter will be used in its place.
   apply_mask(module)
      Simply handles the multiplication between the parameter being
      pruned and the generated mask. Fetches the mask and the original
      tensor from the module and returns the pruned version of the
      tensor.
      Parameters:
         module (nn.Module) -- module containing the tensor to
         prune
      Returns:
         pruned version of the input tensor
      Return type:
         pruned_tensor (torch.Tensor)


pruned_tensor (torch.Tensor)
   prune(t, default_mask=None, importance_scores=None)
      Computes and returns a pruned version of input tensor "t"
      according to the pruning rule specified in "compute_mask()".
      Parameters:
         * t (torch.Tensor) -- tensor to prune (of same
           dimensions as "default_mask").
         * importance_scores (torch.Tensor) -- tensor of
           importance scores (of same shape as "t") used to compute
           mask for pruning "t". The values in this tensor indicate
           the importance of the corresponding elements in the "t"
           that is being pruned. If unspecified or None, the tensor
           "t" will be used in its place.
         * default_mask (torch.Tensor, optional) -- mask
           from previous pruning iteration, if any. To be considered
           when determining what portion of the tensor that pruning
           should act on. If None, default to a mask of ones.
      Returns:


Returns:
         pruned version of tensor "t".
   remove(module)
      Removes the pruning reparameterization from a module. The pruned
      parameter named "name" remains permanently pruned, and the
      parameter named "name+'_orig'" is removed from the parameter
      list. Similarly, the buffer named "name+'_mask'" is removed from
      the buffers.
      Note:
        Pruning itself is NOT undone or reversed!


torch.cuda.set_devicetorch.cuda.set_device(device)
   Sets the current device.
   Usage of this function is discouraged in favor of "device". In most
   cases it's better to use "CUDA_VISIBLE_DEVICES" environmental
   variable.
   Parameters:
      device (torch.device or int) -- selected device. This
      function is a no-op if this argument is negative.


torch.Tensor.i0Tensor.i0() -> Tensor
   See "torch.i0()"


torch.Tensor.orgqrTensor.orgqr(input2) -> Tensor
   See "torch.orgqr()"


torch.Tensor.signbitTensor.signbit() -> Tensor
   See "torch.signbit()"


torch.Tensor.dequantizeTensor.dequantize() -> Tensor
   Given a quantized Tensor, dequantize it and return the dequantized
   float Tensor.


torch.fft.fft2torch.fft.fft2(input, s=None, dim=(- 2, - 1), norm=None, , out=None) -> Tensor
   Computes the 2 dimensional discrete Fourier transform of "input".
   Equivalent to "fftn()" but FFTs only the last two dimensions by
   default.
   Note:
     The Fourier domain representation of any real signal satisfies
     the Hermitian property: "X[i, j] = conj(X[-i, -j])". This
     function always returns all positive and negative frequency terms
     even though, for real inputs, half of these values are redundant.
     "rfft2()" returns the more compact one-sided representation where
     only the positive frequencies of the last dimension are returned.
   Note:
     Supports torch.half and torch.chalf on CUDA with GPU Architecture
     SM53 or greater. However it only supports powers of 2 signal
     length in every transformed dimensions.
   Parameters:
      * input (Tensor) -- the input tensor
      * s (Tuple[int], *optional) -- Signal size in the


transformed dimensions. If given, each dimension "dim[i]" will
        either be zero-padded or trimmed to the length "s[i]" before
        computing the FFT. If a length "-1" is specified, no padding
        is done in that dimension. Default: "s = [input.size(d) for d
        in dim]"
      * dim (Tuple[int], optional) -- Dimensions to be
        transformed. Default: last two dimensions.
      * norm (str, optional) --
        Normalization mode. For the forward transform ("fft2()"),
        these correspond to:
        * ""forward"" - normalize by "1/n"
        * ""backward"" - no normalization
        * ""ortho"" - normalize by "1/sqrt(n)" (making the FFT
          orthonormal)
        Where "n = prod(s)" is the logical FFT size. Calling the
        backward transform ("ifft2()") with the same normalization
        mode will apply an overall normalization of "1/n" between the
        two transforms. This is required to make "ifft2()" the exact
        inverse.


inverse.
        Default is ""backward"" (no normalization).
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   -[ Example ]-

x = torch.rand(10, 10, dtype=torch.complex64)
fft2 = torch.fft.fft2(x)
   The discrete Fourier transform is separable, so "fft2()" here is
   equivalent to two one-dimensional "fft()" calls:
two_ffts = torch.fft.fft(torch.fft.fft(x, dim=0), dim=1)
torch.testing.assert_close(fft2, two_ffts, check_stride=False)


LazyConvTranspose2dclass torch.nn.LazyConvTranspose2d(out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode='zeros', device=None, dtype=None)
   A "torch.nn.ConvTranspose2d" module with lazy initialization of the
   "in_channels" argument of the "ConvTranspose2d" that is inferred
   from the "input.size(1)". The attributes that will be lazily
   initialized are weight and bias.
   Check the "torch.nn.modules.lazy.LazyModuleMixin" for further
   documentation on lazy modules and their limitations.
   Parameters:
      * out_channels (int) -- Number of channels produced by the
        convolution
      * kernel_size (int or tuple) -- Size of the convolving
        kernel
      * stride (int or tuple, optional) -- Stride of the
        convolution. Default: 1
      * padding (int or tuple, optional) -- "dilation *
        (kernel_size - 1) - padding" zero-padding will be added to


both sides of each dimension in the input. Default: 0
      * output_padding (int or tuple, optional) --
        Additional size added to one side of each dimension in the
        output shape. Default: 0
      * groups (int, optional) -- Number of blocked
        connections from input channels to output channels. Default: 1
      * bias (bool, optional) -- If "True", adds a learnable
        bias to the output. Default: "True"
      * dilation (int or tuple, optional) -- Spacing
        between kernel elements. Default: 1
   See also:
     "torch.nn.ConvTranspose2d" and
     "torch.nn.modules.lazy.LazyModuleMixin"
   cls_to_become
      alias of "ConvTranspose2d"


torch.Tensor.ndimensionTensor.ndimension() -> int
   Alias for "dim()"


torch.Tensor.reciprocal_Tensor.reciprocal_() -> Tensor
   In-place version of "reciprocal()"


torch.Tensor.minimumTensor.minimum(other) -> Tensor
   See "torch.minimum()"


torch._foreach_erftorch._foreach_erf(self: List[Tensor]) -> List[Tensor]
   Apply "torch.erf()" to each Tensor of the input list.


torch.jit.freezetorch.jit.freeze(mod, preserved_attrs=None, optimize_numerics=True)
   Freezing a "ScriptModule" will clone it and attempt to inline the
   cloned module's submodules, parameters, and attributes as constants
   in the TorchScript IR Graph. By default, forward will be
   preserved, as well as attributes & methods specified in
   preserved_attrs. Additionally, any attribute that is modified
   within a preserved method will be preserved.
   Freezing currently only accepts ScriptModules that are in eval
   mode.
   Freezing applies generic optimization that will speed up your model
   regardless of machine. To further optimize using server-specific
   settings, run optimize_for_inference after freezing.
   Parameters:
      * mod ("ScriptModule") -- a module to be frozen
      * preserved_attrs (Optional[List[str]]) -- a
        list of attributes to preserve in addition to the forward


method. Attributes modified in preserved methods will also be
        preserved.
      * optimize_numerics (bool) -- If "True", a set of
        optimization passes will be run that does not strictly
        preserve numerics. Full details of optimization can be found
        at torch.jit.run_frozen_optimizations.
   Returns:
      Frozen "ScriptModule".
   Example (Freezing a simple module with a Parameter):
          def forward(self, input):
              output = self.weight.mm(input)
              output = self.linear(output)
              return output
      scripted_module = torch.jit.script(MyModule(2, 3).eval())
      frozen_module = torch.jit.freeze(scripted_module)
      # parameters have been removed and inlined into the Graph as constants
      assert len(list(frozen_module.named_parameters())) == 0
      # See the compiled graph as Python code
      print(frozen_module.code)
   Example (Freezing a module with preserved attributes)
          def forward(self, input):


def forward(self, input):
              self.modified_tensor += 1
              return input + self.modified_tensor
      scripted_module = torch.jit.script(MyModule2().eval())
      frozen_module = torch.jit.freeze(scripted_module, preserved_attrs=["version"])
      # we've manually preserved version, so it still exists on the frozen module and can be modified
      assert frozen_module.version == 1
      frozen_module.version = 2
      # modified_tensor is detected as being mutated in the forward, so freezing preserves
      # it to retain model semantics
      assert frozen_module(torch.tensor(1)) == torch.tensor(12)
      # now that we've run it once, the next result will be incremented by one
      assert frozen_module(torch.tensor(1)) == torch.tensor(13)
   Note:
     Freezing submodule attributes is also supported: frozen_module =
     torch.jit.freeze(scripted_module,
     preserved_attrs=["submodule.version"])
   Note:
     If you're not sure why an attribute is not being inlined as a


constant, you can run dump_alias_db on
     frozen_module.forward.graph to see if freezing has detected the
     attribute is being modified.
   Note:
     Because freezing makes weights constants and removes module
     hierarchy, to and other nn.Module methods to manipulate device
     or dtype no longer work. As a workaround, You can remap devices
     by specifying map_location in torch.jit.load, however device-
     specific logic may have been baked into the model.


torch.cuda.comm.gathertorch.cuda.comm.gather(tensors, dim=0, destination=None, , out=None)
   Gathers tensors from multiple GPU devices.
   Parameters:
      * tensors (Iterable[Tensor]*) -- an iterable of
        tensors to gather. Tensor sizes in all dimensions other than
        "dim" have to match.
      * dim (*int, optional*) -- a dimension along which the
        tensors will be concatenated. Default: "0".
      * destination (*torch.device, str, or int,
        optional*) -- the output device. Can be CPU or CUDA.
        Default: the current CUDA device.
      * out (*Tensor, optional, *keyword-only) -- the
        tensor to store gather result. Its sizes must match those of
        "tensors", except for "dim", where the size must equal
        "sum(tensor.size(dim) for tensor in tensors)". Can be on CPU
        or CUDA.
   Note:
     "destination" must not be specified when "out" is specified.
   Returns:


Returns:
      * If "destination" is specified,
           a tensor located on "destination" device, that is a result
           of concatenating "tensors" along "dim".
      * If "out" is specified,
           the "out" tensor, now containing results of concatenating
           "tensors" along "dim".


GraphInfoclass torch.onnx.verification.GraphInfo(graph, input_args, params_dict, export_options=, id='', _EXCLUDED_NODE_KINDS=frozenset({'aten::ScalarImplicit', 'prim::Constant', 'prim::ListConstruct'}))
   GraphInfo contains validation information of a TorchScript graph
   and its converted ONNX graph.
   all_mismatch_leaf_graph_info()
      Return a list of all leaf GraphInfo objects that have
      mismatch.
      Return type:
         List[GraphInfo]
   clear()
      Clear states and results of previous verification.
   essential_node_count()
      Return the number of nodes in the subgraph excluding those in
      _EXCLUDED_NODE_KINDS.
      Return type:
         int
   essential_node_kinds()
      Return the set of node kinds in the subgraph excluding those in
      _EXCLUDED_NODE_KINDS.
      Return type:
         Set[str]
   export_repro(repro_dir=None, name=None)
      Export the subgraph to ONNX along with the input/output data for
      repro.


repro.
      The repro directory will contain the following files:
         dir
         âââ test_
         â   âââ model.onnx
         â   âââ test_data_set_0
         â       âââ input_0.pb
         â       âââ input_1.pb
         â       âââ output_0.pb
         â       âââ output_1.pb
      Parameters:
         * repro_dir (Optional[str]) -- The directory to
           export the repro files to. Defaults to current working
           directory if None.
         * name (Optional[str]) -- An optional name for
           the test case folder: "test_{name}".
      Returns:
         The path to the exported repro directory.
      Return type:
         str
   find_mismatch(options=None)
      Find all mismatches between the TorchScript IR graph and the
      exported onnx model.
      Binary searches the model graph to find the minimal subgraph
      that exhibits the mismatch. A GraphInfo object is created for


each subgraph, recording the test inputs and export options, as
      well as the validation results.
      Parameters:
         options (Optional[VerificationOptions]) -- The
         verification options.
   find_partition(id)
      Find the GraphInfo object with the given id.
      Return type:
         Optional[GraphInfo]
   has_mismatch()
      Return True if the subgraph has output mismatch between torch
      and ONNX.
      Return type:
         bool
   pretty_print_mismatch(graph=False)
      Pretty print details of the mismatch between torch and ONNX.
      Parameters:
         graph (bool) -- If True, print the ATen JIT graph and
         ONNX graph.
   pretty_print_tree()
      Pretty print GraphInfo tree.
      Each node represents a subgraph, showing the number of nodes in
      the subgraph and a check mark if the subgraph has output
      mismatch between torch and ONNX.
      The id of the subgraph is shown under the node. The GraphInfo


object for any subgraph can be retrieved by calling
      graph_info.find_partition(id).
      Example:
         ==================================== Tree: =====================================
         5 X   __2 X    __1 â
         id:  |  id: 0 |  id: 00
              |        |
              |        |__1 X (aten::relu)
              |           id: 01
              |
              |__3 X    __1 â
                 id: 1 |  id: 10
                       |
                       |__2 X     __1 X (aten::relu)
                          id: 11 |  id: 110
                                 |
                                 |__1 â
                                    id: 111
         =========================== Mismatch leaf subgraphs: ===========================
         ['01', '110']
         ============================= Mismatch node kinds: =============================
         {'aten::relu': 2}
   verify_export(options)
      Verify the export from TorchScript IR graph to ONNX.


Export the TorchScript IR graph to ONNX, with the inputs,
      parameters and export options recorded in this object. Then
      verify the exported ONNX graph against the original TorchScript
      IR graph under the provided verification options.
      Parameters:
         options (VerificationOptions) -- The verification
         options.
      Returns:
         The AssertionError raised during the verification. Returns
         None if no error is raised. onnx_graph: The exported ONNX
         graph in TorchScript IR format. onnx_outs: The outputs from
         running exported ONNX model under the onnx backend in
         options. pt_outs: The outputs from running the TorchScript
         IR graph.
      Return type:
         error


Thresholdclass torch.nn.Threshold(threshold, value, inplace=False)
   Thresholds each element of the input Tensor.
   Threshold is defined as:
      y = \begin{cases} x, &\text{ if } x > \text{threshold} \
      \text{value}, &\text{ otherwise } \end{cases}
   Parameters:
      * threshold (float) -- The value to threshold at
      * value (float) -- The value to replace with
      * inplace (bool) -- can optionally do the operation in-
        place. Default: "False"
   Shape:
      * Input: (), where * means any number of dimensions.
      * Output: (), same shape as the input.
   Examples:
      >>> m = nn.Threshold(0.1, 20)
      >>> input = torch.randn(2)
      >>> output = m(input)


torch.addmvtorch.addmv(input, mat, vec, , beta=1, alpha=1, out=None) -> Tensor
   Performs a matrix-vector product of the matrix "mat" and the vector
   "vec". The vector "input" is added to the final result.
   If "mat" is a (n \times m) tensor, "vec" is a 1-D tensor of size
   m, then "input" must be broadcastable with a 1-D tensor of size
   n and "out" will be 1-D tensor of size n.
   "alpha" and "beta" are scaling factors on matrix-vector product
   between "mat" and "vec" and the added tensor "input" respectively.
      \text{out} = \beta\ \text{input} + \alpha\ (\text{mat}
      \mathbin{@} \text{vec})
   If "beta" is 0, then "input" will be ignored, and nan and inf
   in it will not be propagated.
   For inputs of type FloatTensor or DoubleTensor, arguments
   "beta" and "alpha" must be real numbers, otherwise they should be
   integers.
   Parameters:
      * input (Tensor) -- vector to be added
      * mat (Tensor*) -- matrix to be matrix multiplied


vec (Tensor) -- vector to be matrix multiplied
   Keyword Arguments:
beta (Number, optional) -- multiplier for "input"
    (\beta)
alpha (Number, optional) -- multiplier for mat @ vec
    (\alpha)
out (Tensor, optional) -- the output tensor.
   Example:

M = torch.randn(2)
mat = torch.randn(2, 3)
vec = torch.randn(3)
torch.addmv(M, mat, vec)
  tensor([-0.3768, -5.5565])


torch.lu_unpacktorch.lu_unpack(LU_data, LU_pivots, unpack_data=True, unpack_pivots=True, , out=None)
   Unpacks the LU decomposition returned by "lu_factor()" into the P,
   L, U matrices.
   See also:
     "lu()" returns the matrices from the LU decomposition. Its
     gradient formula is more efficient than that of doing
     "lu_factor()" followed by "lu_unpack()".
   Parameters:
      * LU_data (Tensor) -- the packed LU factorization data
      * LU_pivots (Tensor) -- the packed LU factorization pivots
      * unpack_data (bool) -- flag indicating if the data should
        be unpacked. If "False", then the returned "L" and "U" are
        empty tensors. Default: "True"
      * unpack_pivots (bool) -- flag indicating if the pivots
        should be unpacked into a permutation matrix "P". If "False",
        then the returned "P" is  an empty tensor. Default: "True"
   Keyword Arguments:
      out (tuple, optional*) -- output tuple of three


tensors. Ignored if None.
   Returns:
      A namedtuple "(P, L, U)"
   Examples:
      >>> A = torch.randn(2, 3, 3)
      >>> LU, pivots = torch.linalg.lu_factor(A)
      >>> P, L, U = torch.lu_unpack(LU, pivots)
      >>> # We can recover A from the factorization
      >>> A_ = P @ L @ U
      >>> torch.allclose(A, A_)
      True
      >>> # LU factorization of a rectangular matrix:
      >>> A = torch.randn(2, 3, 2)
      >>> LU, pivots = torch.linalg.lu_factor(A)
      >>> P, L, U = torch.lu_unpack(LU, pivots)
      >>> # P, L, U are the same as returned by linalg.lu
      >>> P_, L_, U_ = torch.linalg.lu(A)
      >>> torch.allclose(P, P_) and torch.allclose(L, L_) and torch.allclose(U, U_)
      True


LayerNormclass torch.nn.LayerNorm(normalized_shape, eps=1e-05, elementwise_affine=True, device=None, dtype=None)
   Applies Layer Normalization over a mini-batch of inputs as
   described in the paper Layer Normalization
      y = \frac{x - \mathrm{E}[x]}{ \sqrt{\mathrm{Var}[x] + \epsilon}}
      * \gamma + \beta
   The mean and standard-deviation are calculated over the last D
   dimensions, where D is the dimension of "normalized_shape". For
   example, if "normalized_shape" is "(3, 5)" (a 2-dimensional shape),
   the mean and standard-deviation are computed over the last 2
   dimensions of the input (i.e. "input.mean((-2, -1))"). \gamma and
   \beta are learnable affine transform parameters of
   "normalized_shape" if "elementwise_affine" is "True". The standard-
   deviation is calculated via the biased estimator, equivalent to
   torch.var(input, unbiased=False).
   Note:
     Unlike Batch Normalization and Instance Normalization, which


applies scalar scale and bias for each entire channel/plane with
     the "affine" option, Layer Normalization applies per-element
     scale and bias with "elementwise_affine".
   This layer uses statistics computed from input data in both
   training and evaluation modes.
   Parameters:
      * normalized_shape (int or list or torch.Size) --
        input shape from an expected input of size
           [ \times \text{normalized_shape}[0] \times
           \text{normalized_shape}[1]     \times \ldots \times
           \text{normalized_shape}[-1]]
        If a single integer is used, it is treated as a singleton
        list, and this module will normalize over the last dimension
        which is expected to be of that specific size.
      * eps (float) -- a value added to the denominator for
        numerical stability. Default: 1e-5
      * elementwise_affine (bool*) -- a boolean value that when
        set to "True", this module has learnable per-element affine


parameters initialized to ones (for weights) and zeros (for
        biases). Default: "True".
   Variables:
      * weight -- the learnable weights of the module of shape
        \text{normalized_shape} when "elementwise_affine" is set to
        "True". The values are initialized to 1.
      * bias -- the learnable bias of the module of shape
        \text{normalized_shape} when "elementwise_affine" is set to
        "True". The values are initialized to 0.
   Shape:
      * Input: (N, )
      * Output: (N, ) (same shape as input)
   Examples:
      >>> # NLP Example
      >>> batch, sentence_length, embedding_dim = 20, 5, 10
      >>> embedding = torch.randn(batch, sentence_length, embedding_dim)
      >>> layer_norm = nn.LayerNorm(embedding_dim)
      >>> # Activate module
      >>> layer_norm(embedding)
      >>>
      >>> # Image Example
      >>> N, C, H, W = 20, 5, 10, 10
      >>> input = torch.randn(N, C, H, W)


input = torch.randn(N, C, H, W)
      >>> # Normalize over the last three dimensions (i.e. the channel and spatial dimensions)
      >>> # as shown in the image below
      >>> layer_norm = nn.LayerNorm([C, H, W])
      >>> output = layer_norm(input)
   [image]


torch.autograd.forward_ad.make_dualtorch.autograd.forward_ad.make_dual(tensor, tangent, , level=None)
   Associates a tensor value with a forward gradient, the tangent, to
   create a "dual tensor", which is used to compute forward AD
   gradients. The result is a new tensor aliased to "tensor" with
   "tangent" embedded as an attribute as-is if it has the same storage
   layout or copied otherwise. The tangent attribute can be recovered
   with "unpack_dual()".
   This function is backward differentiable.
   Given a function f whose jacobian is J, it allows one to
   compute the Jacobian-vector product (jvp) between J and a given
   vector v* as follows.
   Example:
      >>> with dual_level():
      ...     inp = make_dual(x, v)
      ...     out = f(inp)
      ...     y, jvp = unpack_dual(out)
   Please see the forward-mode AD tutorial for detailed steps on how
   to use this API.


AdaptiveAvgPool1dclass torch.nn.AdaptiveAvgPool1d(output_size)
   Applies a 1D adaptive average pooling over an input signal composed
   of several input planes.
   The output size is L_{out}, for any input size. The number of
   output features is equal to the number of input planes.
   Parameters:
      output_size (Union[int, Tuple[int]]) --
      the target output size L_{out}.
   Shape:
      * Input: (N, C, L_{in}) or (C, L_{in}).
      * Output: (N, C, L_{out}) or (C, L_{out}), where
        L_{out}=\text{output_size}.
   -[ Examples ]-

target output size of 5
m = nn.AdaptiveAvgPool1d(5)
input = torch.randn(1, 64, 8)
output = m(input)


torch.Tensor.atan_Tensor.atan_() -> Tensor
   In-place version of "atan()"


torch.fft.ihfft2torch.fft.ihfft2(input, s=None, dim=(- 2, - 1), norm=None, , out=None) -> Tensor
   Computes the 2-dimensional inverse discrete Fourier transform of
   real "input". Equivalent to "ihfftn()" but transforms only the two
   last dimensions by default.
   Note:
     Supports torch.half on CUDA with GPU Architecture SM53 or
     greater. However it only supports powers of 2 signal length in
     every transformed dimensions.
   Parameters:
      * input (Tensor) -- the input tensor
      * s (Tuple[int], optional*) -- Signal size in the
        transformed dimensions. If given, each dimension "dim[i]" will
        either be zero-padded or trimmed to the length "s[i]" before
        computing the Hermitian IFFT. If a length "-1" is specified,
        no padding is done in that dimension. Default: "s =
        [input.size(d) for d in dim]"
      * dim (*Tuple[int], optional*) -- Dimensions to be
        transformed. Default: last two dimensions.


transformed. Default: last two dimensions.
      * norm (str, optional) --
        Normalization mode. For the backward transform ("ihfft2()"),
        these correspond to:
        * ""forward"" - no normalization
        * ""backward"" - normalize by "1/n"
        * ""ortho"" - normalize by "1/sqrt(n)" (making the Hermitian
          IFFT orthonormal)
        Where "n = prod(s)" is the logical IFFT size. Calling the
        forward transform ("hfft2()") with the same normalization mode
        will apply an overall normalization of "1/n" between the two
        transforms. This is required to make "ihfft2()" the exact
        inverse.
        Default is ""backward"" (normalize by "1/n").
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   -[ Example ]-

T = torch.rand(10, 10)
t = torch.fft.ihfft2(t)
t.size()
   torch.Size([10, 6])
   Compared against the full output from "ifft2()", the Hermitian


time-space signal takes up only half the space.

fftn = torch.fft.ifft2(t)
torch.allclose(fftn[..., :6], rfftn)
   True
   The discrete Fourier transform is separable, so "ihfft2()" here is
   equivalent to a combination of "ifft()" and "ihfft()":
two_ffts = torch.fft.ifft(torch.fft.ihfft(t, dim=1), dim=0)
torch.allclose(t, two_ffts)
   True


BNReLU3dclass torch.ao.nn.intrinsic.BNReLU3d(batch_norm, relu)
   This is a sequential container which calls the BatchNorm 3d and
   ReLU modules. During quantization this will be replaced with the
   corresponding fused module.


torch.nn.functional.rrelu_torch.nn.functional.rrelu_(input, lower=1. / 8, upper=1. / 3, training=False) -> Tensor
   In-place version of "rrelu()".


torch.arcsinhtorch.arcsinh(input, *, out=None) -> Tensor
   Alias for "torch.asinh()".


LazyConv1dclass torch.nn.LazyConv1d(out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
   A "torch.nn.Conv1d" module with lazy initialization of the
   "in_channels" argument of the "Conv1d" that is inferred from the
   "input.size(1)". The attributes that will be lazily initialized are
   weight and bias.
   Check the "torch.nn.modules.lazy.LazyModuleMixin" for further
   documentation on lazy modules and their limitations.
   Parameters:
      * out_channels (int) -- Number of channels produced by the
        convolution
      * kernel_size (int or tuple) -- Size of the convolving
        kernel
      * stride (int or tuple, optional) -- Stride of the
        convolution. Default: 1
      * padding (int or tuple, optional) -- Zero-padding
        added to both sides of the input. Default: 0
      * padding_mode (str, optional) -- "'zeros'",


"'reflect'", "'replicate'" or "'circular'". Default: "'zeros'"
      * dilation (int or tuple, optional) -- Spacing
        between kernel elements. Default: 1
      * groups (int, optional) -- Number of blocked
        connections from input channels to output channels. Default: 1
      * bias (bool, optional) -- If "True", adds a learnable
        bias to the output. Default: "True"
   See also:
     "torch.nn.Conv1d" and "torch.nn.modules.lazy.LazyModuleMixin"
   cls_to_become
      alias of "Conv1d"


torch.Tensor.permuteTensor.permute(*dims) -> Tensor
   See "torch.permute()"


torch.sparse.softmaxtorch.sparse.softmax(input, dim, , dtype=None) -> Tensor
   Applies a softmax function.
   Softmax is defined as:
   \text{Softmax}(x_{i}) = \frac{exp(x_i)}{\sum_j exp(x_j)}
   where i, j run over sparse tensor indices and unspecified entries
   are ignores. This is equivalent to defining unspecified entries as
   negative infinity so that exp(x_k) = 0 when the entry with index k
   has not specified.
   It is applied to all slices along dim, and will re-scale them so
   that the elements lie in the range [0, 1] and sum to 1.
   Parameters:
      * input (Tensor) -- input
      * dim (int) -- A dimension along which softmax will be
        computed.
      * dtype* ("torch.dtype", optional) -- the desired data type
        of returned tensor.  If specified, the input tensor is casted
        to "dtype" before the operation is performed. This is useful
        for preventing data type overflows. Default: None


L1Lossclass torch.nn.L1Loss(size_average=None, reduce=None, reduction='mean')
   Creates a criterion that measures the mean absolute error (MAE)
   between each element in the input x and target y.
   The unreduced (i.e. with "reduction" set to "'none'") loss can be
   described as:
      \ell(x, y) = L = {l_1,\dots,l_N}^\top, \quad l_n = \left| x_n
      - y_n \right|,
   where N is the batch size. If "reduction" is not "'none'" (default
   "'mean'"), then:
      \ell(x, y) = \begin{cases}     \operatorname{mean}(L), &
      \text{if reduction} = \text{mean';}\\
      \operatorname{sum}(L),  & \text{if reduction} = \text{sum'.}
      \end{cases}
   x and y are tensors of arbitrary shapes with a total of n elements
   each.
   The sum operation still operates over all the elements, and divides
   by n.
   The division by n can be avoided if one sets "reduction = 'sum'".
   Supports real-valued and complex-valued inputs.
   Parameters:


Parameters:
      * size_average (bool, optional) -- Deprecated (see
        "reduction"). By default, the losses are averaged over each
        loss element in the batch. Note that for some losses, there
        are multiple elements per sample. If the field "size_average"
        is set to "False", the losses are instead summed for each
        minibatch. Ignored when "reduce" is "False". Default: "True"
      * reduce (bool, optional) -- Deprecated (see
        "reduction"). By default, the losses are averaged or summed
        over observations for each minibatch depending on
        "size_average". When "reduce" is "False", returns a loss per
        batch element instead and ignores "size_average". Default:
        "True"
      * reduction (str, optional) -- Specifies the reduction
        to apply to the output: "'none'" | "'mean'" | "'sum'".
        "'none'": no reduction will be applied, "'mean'": the sum of


the output will be divided by the number of elements in the
        output, "'sum'": the output will be summed. Note:
        "size_average" and "reduce" are in the process of being
        deprecated, and in the meantime, specifying either of those
        two args will override "reduction". Default: "'mean'"
   Shape:
      * Input: (), where * means any number of dimensions.
      * Target: (), same shape as the input.
      * Output: scalar. If "reduction" is "'none'", then (*), same
        shape as the input.
   Examples:
      >>> loss = nn.L1Loss()
      >>> input = torch.randn(3, 5, requires_grad=True)
      >>> target = torch.randn(3, 5)
      >>> output = loss(input, target)
      >>> output.backward()


torch.cuda.mem_get_infotorch.cuda.mem_get_info(device=None)
   Returns the global free and total GPU memory occupied for a given
   device using cudaMemGetInfo.
   Parameters:
      device (torch.device or int, optional) -- selected
      device. Returns statistic for the current device, given by
      "current_device()", if "device" is "None" (default).
   Return type:
      Tuple[int, int]
   Note:
     See Memory management for more details about GPU memory
     management.


torch.Tensor.as_stridedTensor.as_strided(size, stride, storage_offset=None) -> Tensor
   See "torch.as_strided()"


torch.isneginftorch.isneginf(input, , out=None) -> Tensor
   Tests if each element of "input" is negative infinity or not.
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.tensor([-float('inf'), float('inf'), 1.2])
      >>> torch.isneginf(a)
      tensor([ True, False, False])


torch.dividetorch.divide(input, other, *, rounding_mode=None, out=None) -> Tensor
   Alias for "torch.div()".


MaxPool1dclass torch.nn.MaxPool1d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
   Applies a 1D max pooling over an input signal composed of several
   input planes.
   In the simplest case, the output value of the layer with input size
   (N, C, L) and output (N, C, L_{out}) can be precisely described as:
      out(N_i, C_j, k) = \max_{m=0, \ldots, \text{kernel_size} - 1}
      input(N_i, C_j, stride \times k + m)
   If "padding" is non-zero, then the input is implicitly padded with
   negative infinity on both sides for "padding" number of points.
   "dilation" is the stride between the elements within the sliding
   window. This link has a nice visualization of the pooling
   parameters.
   Note:
     When ceil_mode=True, sliding windows are allowed to go off-bounds
     if they start within the left padding or the input. Sliding
     windows that would start in the right padded region are ignored.
   Parameters:


Parameters:
      * kernel_size (Union[int, Tuple[int]]) --
        The size of the sliding window, must be > 0.
      * stride (Union[int, Tuple[int]]) -- The
        stride of the sliding window, must be > 0. Default value is
        "kernel_size".
      * padding (Union[int, Tuple[int]]) --
        Implicit negative infinity padding to be added on both sides,
        must be >= 0 and <= kernel_size / 2.
      * dilation (Union[int, Tuple[int]]) -- The
        stride between elements within a sliding window, must be > 0.
      * return_indices (bool) -- If "True", will return the
        argmax along with the max values. Useful for
        "torch.nn.MaxUnpool1d" later
      * ceil_mode (bool) -- If "True", will use ceil instead
        of floor to compute the output shape. This ensures that
        every element in the input tensor is covered by a sliding
        window.
   Shape:


window.
   Shape:
      * Input: (N, C, L_{in}) or (C, L_{in}).
      * Output: (N, C, L_{out}) or (C, L_{out}), where
           L_{out} = \left\lfloor \frac{L_{in} + 2 \times
           \text{padding} - \text{dilation}       \times
           (\text{kernel_size} - 1) - 1}{\text{stride}} +
           1\right\rfloor
   Examples:
      >>> # pool of size=3, stride=2
      >>> m = nn.MaxPool1d(3, stride=2)
      >>> input = torch.randn(20, 16, 50)
      >>> output = m(input)


torch.atan2torch.atan2(input, other, , out=None) -> Tensor
   Element-wise arctangent of \text{input}{i} / \text{other} with
   consideration of the quadrant. Returns a new tensor with the signed
   angles in radians between vector (\text{other}{i},
   \text{input}) and vector (1, 0). (Note that \text{other}{i},
   the second parameter, is the x-coordinate, while \text{input},
   the first parameter, is the y-coordinate.)
   The shapes of "input" and "other" must be broadcastable.
   Parameters:
      * input (Tensor) -- the first input tensor
      * other (Tensor) -- the second input tensor
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(4)
      >>> a
      tensor([ 0.9041,  0.0196, -0.3108, -2.4423])
      >>> torch.atan2(a, torch.randn(4))
      tensor([ 0.9833,  0.0811, -1.9743, -1.4151])


torch.nn.functional.multilabel_margin_losstorch.nn.functional.multilabel_margin_loss(input, target, size_average=None, reduce=None, reduction='mean') -> Tensor
   See "MultiLabelMarginLoss" for details.
   Return type:
      Tensor


torch.Tensor.is_inferenceTensor.is_inference() -> bool
   See "torch.is_inference()"


torch.Tensor.sumTensor.sum(dim=None, keepdim=False, dtype=None) -> Tensor
   See "torch.sum()"


default_fused_act_fake_quanttorch.quantization.fake_quantize.default_fused_act_fake_quant
   alias of functools.partial(, observer=,
   quant_min=0, quant_max=255, dtype=torch.quint8){}


torch.autograd.Function.vmapstatic Function.vmap(info, in_dims, args)
   Defines a rule for the behavior of this autograd.Function
   underneath "torch.vmap()". For a "torch.autograd.Function()" to
   support "torch.vmap()", you must either override this staticmethod,
   or set "generate_vmap_rule" to "True" (you may not do both).
   If you choose to override this staticmethod: it must accept
   * an "info" object as the first argument. "info.batch_size"
     specifies the size of the dimension being vmapped over, while
     "info.randomness" is the randomness option passed to
     "torch.vmap()".
   * an "in_dims" tuple as the second argument. For each arg in
     "args", "in_dims" has a corresponding "Optional[int]". It is
     "None" if the arg is not a Tensor or if the arg is not being
     vmapped over, otherwise, it is an integer specifying what
     dimension of the Tensor is being vmapped over.
   * "args", which is the same as the args to "forward()".


The return of the vmap staticmethod is a tuple of "(output,
   out_dims)". Similar to "in_dims", "out_dims" should be of the same
   structure as "output" and contain one "out_dim" per output that
   specifies if the output has the vmapped dimension and what index it
   is in.
   Please see Extending torch.func with autograd.Function for more
   details.


TripletMarginLossclass torch.nn.TripletMarginLoss(margin=1.0, p=2.0, eps=1e-06, swap=False, size_average=None, reduce=None, reduction='mean')
   Creates a criterion that measures the triplet loss given an input
   tensors x1, x2, x3 and a margin with a value greater than 0. This
   is used for measuring a relative similarity between samples. A
   triplet is composed by a, p and n (i.e., anchor, positive
   examples and negative examples respectively). The shapes of all
   input tensors should be (N, D).
   The distance swap is described in detail in the paper Learning
   shallow convolutional feature descriptors with triplet losses by V.
   Balntas, E. Riba et al.
   The loss function for each sample in the mini-batch is:
      L(a, p, n) = \max {d(a_i, p_i) - d(a_i, n_i) + {\rm margin},
      0}
   where
      d(x_i, y_i) = \left\lVert {\bf x}_i - {\bf y}_i \right\rVert_p
   See also "TripletMarginWithDistanceLoss", which computes the


triplet margin loss for input tensors using a custom distance
   function.
   Parameters:
      * margin (float, optional) -- Default: 1.
      * p (int, optional) -- The norm degree for pairwise
        distance. Default: 2.
      * swap (bool, optional) -- The distance swap is
        described in detail in the paper Learning shallow
        convolutional feature descriptors with triplet losses by V.
        Balntas, E. Riba et al. Default: "False".
      * size_average (bool, optional) -- Deprecated (see
        "reduction"). By default, the losses are averaged over each
        loss element in the batch. Note that for some losses, there
        are multiple elements per sample. If the field "size_average"
        is set to "False", the losses are instead summed for each
        minibatch. Ignored when "reduce" is "False". Default: "True"
      * reduce (bool, optional) -- Deprecated (see


"reduction"). By default, the losses are averaged or summed
        over observations for each minibatch depending on
        "size_average". When "reduce" is "False", returns a loss per
        batch element instead and ignores "size_average". Default:
        "True"
      * reduction (str, optional) -- Specifies the reduction
        to apply to the output: "'none'" | "'mean'" | "'sum'".
        "'none'": no reduction will be applied, "'mean'": the sum of
        the output will be divided by the number of elements in the
        output, "'sum'": the output will be summed. Note:
        "size_average" and "reduce" are in the process of being
        deprecated, and in the meantime, specifying either of those
        two args will override "reduction". Default: "'mean'"
   Shape:
      * Input: (N, D) or (D) where D is the vector dimension.
      * Output: A Tensor of shape (N) if "reduction" is "'none'" and
        input shape is (N, D); a scalar otherwise.
   Examples:


Examples:
      >>> triplet_loss = nn.TripletMarginLoss(margin=1.0, p=2)
      >>> anchor = torch.randn(100, 128, requires_grad=True)
      >>> positive = torch.randn(100, 128, requires_grad=True)
      >>> negative = torch.randn(100, 128, requires_grad=True)
      >>> output = triplet_loss(anchor, positive, negative)
      >>> output.backward()


torch.Tensor.index_addTensor.index_add(dim, index, source, *, alpha=1) -> Tensor
   Out-of-place version of "torch.Tensor.index_add_()".


torch.broadcast_shapestorch.broadcast_shapes(shapes) -> Size
   Similar to "broadcast_tensors()" but for shapes.
   This is equivalent to "torch.broadcast_tensors(map(torch.empty,
   shapes))[0].shape" but avoids the need create to intermediate
   tensors. This is useful for broadcasting tensors of common batch
   shape but different rightmost shape, e.g. to broadcast mean vectors
   with covariance matrices.
   Example:
      >>> torch.broadcast_shapes((2,), (3, 1), (1, 1, 1))
      torch.Size([1, 3, 2])
   Parameters:
      shapes (torch.Size*) -- Shapes of tensors.
   Returns:
      A shape compatible with all input shapes.
   Return type:
      shape (torch.Size)
   Raises:
      RuntimeError** -- If shapes are incompatible.


torch.nn.functional.conv_transpose1dtorch.nn.functional.conv_transpose1d(input, weight, bias=None, stride=1, padding=0, output_padding=0, groups=1, dilation=1) -> Tensor
   Applies a 1D transposed convolution operator over an input signal
   composed of several input planes, sometimes also called
   "deconvolution".
   This operator supports TensorFloat32.
   See "ConvTranspose1d" for details and output shape.
   Note:
     In some circumstances when given tensors on a CUDA device and
     using CuDNN, this operator may select a nondeterministic
     algorithm to increase performance. If this is undesirable, you
     can try to make the operation deterministic (potentially at a
     performance cost) by setting "torch.backends.cudnn.deterministic
     = True". See Reproducibility for more information.
   Parameters:
      * input -- input tensor of shape (\text{minibatch} ,
        \text{in_channels} , iW)
      * weight -- filters of shape (\text{in_channels} ,


\frac{\text{out_channels}}{\text{groups}} , kW)
      * bias -- optional bias of shape (\text{out_channels}).
        Default: None
      * stride -- the stride of the convolving kernel. Can be a
        single number or a tuple "(sW,)". Default: 1
      * padding -- "dilation * (kernel_size - 1) - padding" zero-
        padding will be added to both sides of each dimension in the
        input. Can be a single number or a tuple "(padW,)". Default: 0
      * output_padding -- additional size added to one side of
        each dimension in the output shape. Can be a single number or
        a tuple "(out_padW)". Default: 0
      * groups -- split input into groups, \text{in_channels}
        should be divisible by the number of groups. Default: 1
      * dilation -- the spacing between kernel elements. Can be a
        single number or a tuple "(dW,)". Default: 1
   Examples:
      >>> inputs = torch.randn(20, 16, 50)
      >>> weights = torch.randn(16, 33, 5)


weights = torch.randn(16, 33, 5)
      >>> F.conv_transpose1d(inputs, weights)


Hardshrinkclass torch.nn.Hardshrink(lambd=0.5)
   Applies the Hard Shrinkage (Hardshrink) function element-wise.
   Hardshrink is defined as:
      \text{HardShrink}(x) = \begin{cases} x, & \text{ if } x >
      \lambda \ x, & \text{ if } x < -\lambda \ 0, & \text{
      otherwise } \end{cases}
   Parameters:
      lambd (float) -- the \lambda value for the Hardshrink
      formulation. Default: 0.5
   Shape:
      * Input: (), where * means any number of dimensions.
      * Output: (), same shape as the input.
   [image]
   Examples:
      >>> m = nn.Hardshrink()
      >>> input = torch.randn(2)
      >>> output = m(input)


torch.dottorch.dot(input, other, , out=None) -> Tensor
   Computes the dot product of two 1D tensors.
   Note:
     Unlike NumPy's dot, torch.dot intentionally only supports
     computing the dot product of two 1D tensors with the same number
     of elements.
   Parameters:
      * input (Tensor) -- first tensor in the dot product, must
        be 1D.
      * other (Tensor) -- second tensor in the dot product, must
        be 1D.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> torch.dot(torch.tensor([2, 3]), torch.tensor([2, 1]))
      tensor(7)


torch.cuda.current_devicetorch.cuda.current_device()
   Returns the index of a currently selected device.
   Return type:
      int


AdaptiveMaxPool1dclass torch.nn.AdaptiveMaxPool1d(output_size, return_indices=False)
   Applies a 1D adaptive max pooling over an input signal composed of
   several input planes.
   The output size is L_{out}, for any input size. The number of
   output features is equal to the number of input planes.
   Parameters:
      * output_size (Union[int, Tuple[int]]) --
        the target output size L_{out}.
      * return_indices (bool) -- if "True", will return the
        indices along with the outputs. Useful to pass to
        nn.MaxUnpool1d. Default: "False"
   Shape:
      * Input: (N, C, L_{in}) or (C, L_{in}).
      * Output: (N, C, L_{out}) or (C, L_{out}), where
        L_{out}=\text{output_size}.
   -[ Examples ]-

target output size of 5
m = nn.AdaptiveMaxPool1d(5)
input = torch.randn(1, 64, 8)
output = m(input)


torch.Tensor.isnanTensor.isnan() -> Tensor
   See "torch.isnan()"


default_per_channel_qconfigtorch.quantization.qconfig.default_per_channel_qconfig
   alias of QConfig(activation=functools.partial(, quant_min=0,
   quant_max=127){}, weight=functools.partial(,
   dtype=torch.qint8, qscheme=torch.per_channel_symmetric){})


ScriptFunctionclass torch.jit.ScriptFunction
   Functionally equivalent to a "ScriptModule", but represents a
   single function and does not have any attributes or Parameters.
   get_debug_state(self: torch._C.ScriptFunction) -> torch._C.GraphExecutorState
   save(self: torch._C.ScriptFunction, filename: str, _extra_files: Dict[str, str] = {}) -> None
   save_to_buffer(self: torch._C.ScriptFunction, _extra_files: Dict[str, str] = {}) -> bytes


torch.nn.utils.parametrize.cachedtorch.nn.utils.parametrize.cached()
   Context manager that enables the caching system within
   parametrizations registered with "register_parametrization()".
   The value of the parametrized objects is computed and cached the
   first time they are required when this context manager is active.
   The cached values are discarded when leaving the context manager.
   This is useful when using a parametrized parameter more than once
   in the forward pass. An example of this is when parametrizing the
   recurrent kernel of an RNN or when sharing weights.
   The simplest way to activate the cache is by wrapping the forward
   pass of the neural network
      import torch.nn.utils.parametrize as P
      ...
      with P.cached():
          output = model(inputs)
   in training and evaluation. One may also wrap the parts of the
   modules that use several times the parametrized tensors. For


example, the loop of an RNN with a parametrized recurrent kernel:
      with P.cached():
          for x in xs:
              out_rnn = self.rnn_cell(x, out_rnn)


LeakyReLUclass torch.ao.nn.quantized.LeakyReLU(scale, zero_point, negative_slope=0.01, inplace=False, device=None, dtype=None)
   This is the quantized equivalent of "LeakyReLU".
   Parameters:
      * scale (float) -- quantization scale of the output tensor
      * zero_point (int) -- quantization zero point of the
        output tensor
      * negative_slope (float) -- Controls the angle of the
        negative slope. Default: 1e-2


torch.reshapetorch.reshape(input, shape) -> Tensor
   Returns a tensor with the same data and number of elements as
   "input", but with the specified shape. When possible, the returned
   tensor will be a view of "input". Otherwise, it will be a copy.
   Contiguous inputs and inputs with compatible strides can be
   reshaped without copying, but you should not depend on the copying
   vs. viewing behavior.
   See "torch.Tensor.view()" on when it is possible to return a view.
   A single dimension may be -1, in which case it's inferred from the
   remaining dimensions and the number of elements in "input".
   Parameters:
      * input (Tensor) -- the tensor to be reshaped
      * shape (tuple of python:int) -- the new shape
   Example:
      >>> a = torch.arange(4.)
      >>> torch.reshape(a, (2, 2))
      tensor([[ 0.,  1.],
              [ 2.,  3.]])
      >>> b = torch.tensor([[0, 1], [2, 3]])
      >>> torch.reshape(b, (-1,))
      tensor([ 0,  1,  2,  3])


torch.get_num_interop_threadstorch.get_num_interop_threads() -> int
   Returns the number of threads used for inter-op parallelism on CPU
   (e.g. in JIT interpreter)


torch.nn.functional.mse_losstorch.nn.functional.mse_loss(input, target, size_average=None, reduce=None, reduction='mean') -> Tensor
   Measures the element-wise mean squared error.
   See "MSELoss" for details.
   Return type:
      Tensor


torch.Tensor.less_equalTensor.less_equal(other) -> Tensor
   See "torch.less_equal()".


torch.acostorch.acos(input, , out=None) -> Tensor
   Computes the inverse cosine of each element in "input".
      \text{out}{i} = \cos^{-1}(\text{input})
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(4)
      >>> a
      tensor([ 0.3348, -0.5889,  0.2005, -0.1584])
      >>> torch.acos(a)
      tensor([ 1.2294,  2.2004,  1.3690,  1.7298])


torch.Tensor.diag_embedTensor.diag_embed(offset=0, dim1=- 2, dim2=- 1) -> Tensor
   See "torch.diag_embed()"


torch.resolve_conjtorch.resolve_conj(input) -> Tensor
   Returns a new tensor with materialized conjugation if "input"'s
   conjugate bit is set to True, else returns "input". The output
   tensor will always have its conjugate bit set to False.
   Parameters:
      input (Tensor) -- the input tensor.
   Example:
      >>> x = torch.tensor([-1 + 1j, -2 + 2j, 3 - 3j])
      >>> y = x.conj()
      >>> y.is_conj()
      True
      >>> z = y.resolve_conj()
      >>> z
      tensor([-1 - 1j, -2 - 2j, 3 + 3j])
      >>> z.is_conj()
      False


torch.Tensor.log10_Tensor.log10_() -> Tensor
   In-place version of "log10()"


Dropout1dclass torch.nn.Dropout1d(p=0.5, inplace=False)
   Randomly zero out entire channels (a channel is a 1D feature map,
   e.g., the j-th channel of the i-th sample in the batched input is a
   1D tensor \text{input}[i, j]). Each channel will be zeroed out
   independently on every forward call with probability "p" using
   samples from a Bernoulli distribution.
   Usually the input comes from "nn.Conv1d" 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, "nn.Dropout1d()" will help promote independence
   between feature maps and should be used instead.
   Parameters:
      * p (float, optional) -- probability of an element to
        be zero-ed.


be zero-ed.
      * inplace (bool, optional) -- If set to "True", will
        do this operation in-place
   Shape:
      * Input: (N, C, L) or (C, L).
      * Output: (N, C, L) or (C, L) (same shape as input).
   Examples:
      >>> m = nn.Dropout1d(p=0.2)
      >>> input = torch.randn(20, 16, 32)
      >>> output = m(input)


torch.Tensor.asinh_Tensor.asinh_() -> Tensor
   In-place version of "asinh()"


torch.Tensor.ormqrTensor.ormqr(input2, input3, left=True, transpose=False) -> Tensor
   See "torch.ormqr()"


MultiplicativeLRclass torch.optim.lr_scheduler.MultiplicativeLR(optimizer, lr_lambda, last_epoch=- 1, verbose=False)
   Multiply the learning rate of each parameter group by the factor
   given in the specified function. When last_epoch=-1, sets initial
   lr as lr.
   Parameters:
      * optimizer (Optimizer) -- Wrapped optimizer.
      * lr_lambda (function or list) -- A function which
        computes a multiplicative factor given an integer parameter
        epoch, or a list of such functions, one for each group in
        optimizer.param_groups.
      * last_epoch (int) -- The index of last epoch. Default:
        -1.
      * verbose (bool) -- If "True", prints a message to stdout
        for each update. Default: "False".
   -[ Example ]-

lmbda = lambda epoch: 0.95
scheduler = MultiplicativeLR(optimizer, lr_lambda=lmbda)
for epoch in range(100):
    train(...)
    validate(...)
    scheduler.step()
   get_last_lr()


scheduler.step()

get_last_lr()
      Return last computed learning rate by current scheduler.
   load_state_dict(state_dict)
      Loads the schedulers state.
      Parameters:
         state_dict (dict) -- scheduler state. Should be an
         object returned from a call to "state_dict()".
   print_lr(is_verbose, group, lr, epoch=None)
      Display the current learning rate.
   state_dict()
      Returns the state of the scheduler as a "dict".
      It contains an entry for every variable in self.dict which
      is not the optimizer. The learning rate lambda functions will
      only be saved if they are callable objects and not if they are
      functions or lambdas.


torch.igammatorch.igamma(input, other, *, out=None) -> Tensor
   Alias for "torch.special.gammainc()".


torch.Tensor.divTensor.div(value, *, rounding_mode=None) -> Tensor
   See "torch.div()"


torch.cuda.reset_peak_memory_statstorch.cuda.reset_peak_memory_stats(device=None)
   Resets the "peak" stats tracked by the CUDA memory allocator.
   See "memory_stats()" for details. Peak stats correspond to the
   "peak" key in each individual stat dict.
   Parameters:
      device (torch.device or int, optional) -- selected
      device. Returns statistic for the current device, given by
      "current_device()", if "device" is "None" (default).
   Note:
     See Memory management for more details about GPU memory
     management.


torch.nn.functional.embeddingtorch.nn.functional.embedding(input, weight, padding_idx=None, max_norm=None, norm_type=2.0, scale_grad_by_freq=False, sparse=False)
   A simple lookup table that looks up embeddings in a fixed
   dictionary and size.
   This module is often used to retrieve word embeddings using
   indices. The input to the module is a list of indices, and the
   embedding matrix, and the output is the corresponding word
   embeddings.
   See "torch.nn.Embedding" for more details.
   Parameters:
      * input (LongTensor) -- Tensor containing indices into the
        embedding matrix
      * weight (Tensor) -- The embedding matrix with number of
        rows equal to the maximum possible index + 1, and number of
        columns equal to the embedding size
      * padding_idx (int, optional) -- If specified, the
        entries at "padding_idx" do not contribute to the gradient;
        therefore, the embedding vector at "padding_idx" is not


updated during training, i.e. it remains as a fixed "pad".
      * max_norm (float, optional) -- If given, each
        embedding vector with norm larger than "max_norm" is
        renormalized to have norm "max_norm". Note: this will modify
        "weight" in-place.
      * norm_type (float, optional) -- The p of the p-norm
        to compute for the "max_norm" option. Default "2".
      * scale_grad_by_freq (bool, optional) -- If given,
        this will scale gradients by the inverse of frequency of the
        words in the mini-batch. Default "False".
      * sparse (bool, optional) -- If "True", gradient
        w.r.t. "weight" will be a sparse tensor. See Notes under
        "torch.nn.Embedding" for more details regarding sparse
        gradients.
   Return type:
      Tensor
   Shape:
      * Input: LongTensor of arbitrary shape containing the indices to
        extract
      * Weight: Embedding matrix of floating point type with shape


(V, embedding_dim), where V = maximum index + 1 and
        embedding_dim = the embedding size
      * Output: (, embedding_dim)*, where *** is the input shape
   Examples:
      >>> # a batch of 2 samples of 4 indices each
      >>> input = torch.tensor([[1, 2, 4, 5], [4, 3, 2, 9]])
      >>> # an embedding matrix containing 10 tensors of size 3
      >>> embedding_matrix = torch.rand(10, 3)
      >>> F.embedding(input, embedding_matrix)
      tensor([[[ 0.8490,  0.9625,  0.6753],
               [ 0.9666,  0.7761,  0.6108],
               [ 0.6246,  0.9751,  0.3618],
               [ 0.4161,  0.2419,  0.7383]],
              [[ 0.6246,  0.9751,  0.3618],
               [ 0.0237,  0.7794,  0.0528],
               [ 0.9666,  0.7761,  0.6108],
               [ 0.3385,  0.8612,  0.1867]]])
      >>> # example with padding_idx
      >>> weights = torch.rand(10, 3)
      >>> weights[0, :].zero_()
      >>> embedding_matrix = weights
      >>> input = torch.tensor([[0, 2, 0, 5]])


input = torch.tensor([[0, 2, 0, 5]])
      >>> F.embedding(input, embedding_matrix, padding_idx=0)
      tensor([[[ 0.0000,  0.0000,  0.0000],
               [ 0.5609,  0.5384,  0.8720],
               [ 0.0000,  0.0000,  0.0000],
               [ 0.6262,  0.2438,  0.7471]]])


torch.fft.hffttorch.fft.hfft(input, n=None, dim=- 1, norm=None, *, out=None) -> Tensor
   Computes the one dimensional discrete Fourier transform of a
   Hermitian symmetric "input" signal.
   Note:
     "hfft()"/"ihfft()" are analogous to "rfft()"/"irfft()". The real
     FFT expects a real signal in the time-domain and gives a
     Hermitian symmetry in the frequency-domain. The Hermitian FFT is
     the opposite; Hermitian symmetric in the time-domain and real-
     valued in the frequency-domain. For this reason, special care
     needs to be taken with the length argument "n", in the same way
     as with "irfft()".
   Note:
     Because the signal is Hermitian in the time-domain, the result
     will be real in the frequency domain. Note that some input
     frequencies must be real-valued to satisfy the Hermitian
     property. In these cases the imaginary component will be ignored.
     For example, any imaginary component in "input[0]" would result


in one or more complex frequency terms which cannot be
     represented in a real output and so will always be ignored.
   Note:
     The correct interpretation of the Hermitian input depends on the
     length of the original data, as given by "n". This is because
     each input shape could correspond to either an odd or even length
     signal. By default, the signal is assumed to be even length and
     odd signals will not round-trip properly. So, it is recommended
     to always pass the signal length "n".
   Note:
     Supports torch.half and torch.chalf on CUDA with GPU Architecture
     SM53 or greater. However it only supports powers of 2 signal
     length in every transformed dimension. With default arguments,
     size of the transformed dimension should be (2^n + 1) as argument
     n defaults to even output size = 2 * (transformed_dim_size - 1)
   Parameters:
      * input (Tensor) -- the input tensor representing a half-
        Hermitian signal


Hermitian signal
      * n (int, optional) -- Output signal length. This
        determines the length of the real output. If given, the input
        will either be zero-padded or trimmed to this length before
        computing the Hermitian FFT. Defaults to even output:
        "n=2(input.size(dim) - 1)".
      * dim (int, optional) -- The dimension along which to
        take the one dimensional Hermitian FFT.
      * norm (str, optional*) --
        Normalization mode. For the forward transform ("hfft()"),
        these correspond to:
        * ""forward"" - normalize by "1/n"
        * ""backward"" - no normalization
        * ""ortho"" - normalize by "1/sqrt(n)" (making the Hermitian
          FFT orthonormal)
        Calling the backward transform ("ihfft()") with the same
        normalization mode will apply an overall normalization of
        "1/n" between the two transforms. This is required to make
        "ihfft()" the exact inverse.


"ihfft()" the exact inverse.
        Default is ""backward"" (no normalization).
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   -[ Example ]-
   Taking a real-valued frequency signal and bringing it into the time
   domain gives Hermitian symmetric output:

t = torch.linspace(0, 1, 5)
t
   tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])
T = torch.fft.ifft(t)
T
   tensor([ 0.5000-0.0000j, -0.1250-0.1720j, -0.1250-0.0406j, -0.1250+0.0406j,
           -0.1250+0.1720j])
   Note that "T[1] == T[-1].conj()" and "T[2] == T[-2].conj()" is
   redundant. We can thus compute the forward transform without
   considering negative frequencies:
torch.fft.hfft(T[:3], n=5)
   tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])
   Like with "irfft()", the output length must be given in order to
   recover an even length output:
torch.fft.hfft(T[:3])
   tensor([0.1250, 0.2809, 0.6250, 0.9691])


UpsamplingNearest2dclass torch.nn.UpsamplingNearest2d(size=None, scale_factor=None)
   Applies a 2D nearest neighbor upsampling to an input signal
   composed of several input channels.
   To specify the scale, it takes either the "size" or the
   "scale_factor" as it's constructor argument.
   When "size" is given, it is the output size of the image (h, w).
   Parameters:
      * size (int or Tuple[int, int],
        optional) -- output spatial sizes
      * scale_factor (float or Tuple[float,
        float], optional) -- multiplier for spatial size.
   Warning:
     This class is deprecated in favor of "interpolate()".
   Shape:
      * Input: (N, C, H_{in}, W_{in})
      * Output: (N, C, H_{out}, W_{out}) where
      H_{out} = \left\lfloor H_{in} \times \text{scale_factor}
      \right\rfloor
      W_{out} = \left\lfloor W_{in} \times \text{scale_factor}
      \right\rfloor
   Examples:


\right\rfloor
   Examples:
      >>> input = torch.arange(1, 5, dtype=torch.float32).view(1, 1, 2, 2)
      >>> input
      tensor([[[[1., 2.],
                [3., 4.]]]])
      >>> m = nn.UpsamplingNearest2d(scale_factor=2)
      >>> m(input)
      tensor([[[[1., 1., 2., 2.],
                [1., 1., 2., 2.],
                [3., 3., 4., 4.],
                [3., 3., 4., 4.]]]])


torch.Tensor.abs_Tensor.abs_() -> Tensor
   In-place version of "abs()"


torch.Tensor.asinhTensor.asinh() -> Tensor
   See "torch.asinh()"


torch.subtracttorch.subtract(input, other, *, alpha=1, out=None) -> Tensor
   Alias for "torch.sub()".


quantize_dynamicclass torch.quantization.quantize_dynamic(model, qconfig_spec=None, dtype=torch.qint8, mapping=None, inplace=False)
   Converts a float model to dynamic (i.e. weights-only) quantized
   model.
   Replaces specified modules with dynamic weight-only quantized
   versions and output the quantized model.
   For simplest usage provide dtype argument that can be float16 or
   qint8. Weight-only quantization by default is performed for layers
   with large weights size - i.e. Linear and RNN variants.
   Fine grained control is possible with qconfig and mapping that
   act similarly to quantize(). If qconfig is provided, the
   dtype argument is ignored.
   Parameters:
      * model -- input model
      * qconfig_spec --
        Either:
        * A dictionary that maps from name or type of submodule to
          quantization configuration, qconfig applies to all
          submodules of a given module unless qconfig for the


submodules are specified (when the submodule already has
          qconfig attribute). Entries in the dictionary need to be
          QConfig instances.
        * A set of types and/or submodule names to apply dynamic
          quantization to, in which case the dtype argument is used
          to specify the bit-width
      * inplace -- carry out model transformations in-place, the
        original module is mutated
      * mapping -- maps type of a submodule to a type of
        corresponding dynamically quantized version with which the
        submodule needs to be replaced


torch.Tensor.istftTensor.istft(n_fft, hop_length=None, win_length=None, window=None, center=True, normalized=False, onesided=None, length=None, return_complex=False)
   See "torch.istft()"


torch.concatenatetorch.concatenate(tensors, axis=0, out=None) -> Tensor
   Alias of "torch.cat()".


ConvTranspose1dclass torch.nn.ConvTranspose1d(in_channels, out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode='zeros', device=None, dtype=None)
   Applies a 1D transposed convolution operator over an input image
   composed of several input planes.
   This module can be seen as the gradient of Conv1d with respect to
   its input. It is also known as a fractionally-strided convolution
   or a deconvolution (although it is not an actual deconvolution
   operation as it does not compute a true inverse of convolution).
   For more information, see the visualizations here and the
   Deconvolutional Networks paper.
   This module supports TensorFloat32.
   On certain ROCm devices, when using float16 inputs this module will
   use different precision for backward.
   * "stride" controls the stride for the cross-correlation.
   * "padding" controls the amount of implicit zero padding on both


sides for "dilation * (kernel_size - 1) - padding" number of
     points. See note below for details.
   * "output_padding" controls the additional size added to one side
     of the output shape. See note below for details.
   * "dilation" controls the spacing between the kernel points; also
     known as the Ã  trous algorithm. It is harder to describe, but the
     link here has a nice visualization of what "dilation" does.
   * "groups" controls the connections between inputs and outputs.
     "in_channels" and "out_channels" must both be divisible by
     "groups". For example,
        * At groups=1, all inputs are convolved to all outputs.
        * At groups=2, the operation becomes equivalent to having two
          conv layers side by side, each seeing half the input
          channels and producing half the output channels, and both
          subsequently concatenated.
        * At groups= "in_channels", each input channel is convolved
          with its own set of filters (of size


with its own set of filters (of size
          \frac{\text{out_channels}}{\text{in_channels}}).
   Note:
     The "padding" argument effectively adds "dilation * (kernel_size
     - 1) - padding" amount of zero padding to both sizes of the
     input. This is set so that when a "Conv1d" and a
     "ConvTranspose1d" are initialized with same parameters, they are
     inverses of each other in regard to the input and output shapes.
     However, when "stride > 1", "Conv1d" maps multiple input shapes
     to the same output shape. "output_padding" is provided to resolve
     this ambiguity by effectively increasing the calculated output
     shape on one side. Note that "output_padding" is only used to
     find output shape, but does not actually add zero-padding to
     output.
   Note:
     In some circumstances when using the CUDA backend with CuDNN,
     this operator may select a nondeterministic algorithm to increase
     performance. If this is undesirable, you can try to make the


operation deterministic (potentially at a performance cost) by
     setting "torch.backends.cudnn.deterministic = True". Please see
     the notes on Reproducibility for background.
   Parameters:
      * in_channels (int) -- Number of channels in the input
        image
      * out_channels (int) -- Number of channels produced by the
        convolution
      * kernel_size (int or tuple) -- Size of the convolving
        kernel
      * stride (int or tuple, optional) -- Stride of the
        convolution. Default: 1
      * padding (int or tuple, optional) -- "dilation *
        (kernel_size - 1) - padding" zero-padding will be added to
        both sides of the input. Default: 0
      * output_padding (int or tuple, optional) --
        Additional size added to one side of the output shape.
        Default: 0
      * groups (int, optional) -- Number of blocked
        connections from input channels to output channels. Default: 1


bias (bool, optional) -- If "True", adds a learnable
        bias to the output. Default: "True"
dilation (int or tuple, optional) -- Spacing
    between kernel elements. Default: 1
   Shape:
Input: (N, C_{in}, L_{in}) or (C_{in}, L_{in})
Output: (N, C_{out}, L_{out}) or (C_{out}, L_{out}), where
       L_{out} = (L_{in} - 1) \times \text{stride} - 2 \times
       \text{padding} + \text{dilation}           \times
       (\text{kernel_size} - 1) + \text{output_padding} + 1
   Variables:
weight (Tensor) -- the learnable weights of the module
    of shape (\text{in_channels},
    \frac{\text{out_channels}}{\text{groups}},
    \text{kernel_size}). The values of these weights are sampled
    from \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
    \frac{groups}{C_\text{out} * \text{kernel_size}}
bias (Tensor) -- the learnable bias of the module of


shape (out_channels). If "bias" is "True", then the values of
        these weights are sampled from \mathcal{U}(-\sqrt{k},
        \sqrt{k}) where k = \frac{groups}{C_\text{out} *
        \text{kernel_size}}


torch.hypottorch.hypot(input, other, , out=None) -> Tensor
   Given the legs of a right triangle, return its hypotenuse.
      \text{out}{i} = \sqrt{\text{input}^{2} +
      \text{other}_{i}^{2}}
   The shapes of "input" and "other" must be broadcastable.
   Parameters:
      * input (Tensor) -- the first input tensor
      * other (Tensor) -- the second input tensor
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.hypot(torch.tensor([4.0]), torch.tensor([3.0, 4.0, 5.0]))
      tensor([5.0000, 5.6569, 6.4031])


torch.Tensor.asinTensor.asin() -> Tensor
   See "torch.asin()"


torch.Tensor.floor_divide_Tensor.floor_divide_(value) -> Tensor
   In-place version of "floor_divide()"


torch.Tensor.to_sparse_bscTensor.to_sparse_bsc(blocksize, dense_dim) -> Tensor
   Convert a tensor to a block sparse column (BSC) storage format of
   given blocksize.  If the "self" is strided, then the number of
   dense dimensions could be specified, and a hybrid BSC tensor will
   be created, with dense_dim dense dimensions and self.dim() - 2 -
   dense_dim batch dimension.
   Parameters:
      * blocksize (list, tuple, "torch.Size", optional) -- Block
        size of the resulting BSC tensor. A block size must be a tuple
        of length two such that its items evenly divide the two sparse
        dimensions.
      * dense_dim (int, optional) -- Number of dense
        dimensions of the resulting BSC tensor.  This argument should
        be used only if "self" is a strided tensor, and must be a
        value between 0 and dimension of "self" tensor minus two.
   Example:
      >>> dense = torch.randn(10, 10)
      >>> sparse = dense.to_sparse_csr()


sparse = dense.to_sparse_csr()
      >>> sparse_bsc = sparse.to_sparse_bsc((5, 5))
      >>> sparse_bsc.row_indices()
      tensor([0, 1, 0, 1])
      >>> dense = torch.zeros(4, 3, 1)
      >>> dense[0:2, 0] = dense[0:2, 2] = dense[2:4, 1] = 1
      >>> dense.to_sparse_bsc((2, 1), 1)
      tensor(ccol_indices=tensor([0, 1, 2, 3]),
             row_indices=tensor([0, 1, 0]),
             values=tensor([[[[1.]],
                             [[1.]]],
                            [[[1.]],
                             [[1.]]],
                            [[[1.]],
                             [[1.]]]]), size=(4, 3, 1), nnz=3,
             layout=torch.sparse_bsc)


torch.bartlett_windowtorch.bartlett_window(window_length, periodic=True, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
   Bartlett window function.
      w[n] = 1 - \left| \frac{2n}{N-1} - 1 \right| = \begin{cases}
      \frac{2n}{N - 1} & \text{if } 0 \leq n \leq \frac{N - 1}{2} \
      2 - \frac{2n}{N - 1} & \text{if } \frac{N - 1}{2} < n < N \
      \end{cases},
   where N is the full window size.
   The input "window_length" is a positive integer controlling the
   returned window size. "periodic" flag determines whether the
   returned window trims off the last duplicate value from the
   symmetric window and is ready to be used as a periodic window with
   functions like "torch.stft()". Therefore, if "periodic" is true,
   the N in above formula is in fact \text{window_length} + 1. Also,
   we always have "torch.bartlett_window(L, periodic=True)" equal to
   "torch.bartlett_window(L + 1, periodic=False)[:-1])".
   Note:


Note:
     If "window_length" =1, the returned window contains a single
     value 1.
   Parameters:
      * window_length (int) -- the size of returned window
      * periodic (bool, optional) -- If True, returns a
        window to be used as periodic function. If False, return a
        symmetric window.
   Keyword Arguments:
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default
        (see "torch.set_default_tensor_type()"). Only floating point
        types are supported.
      * layout ("torch.layout", optional) -- the desired layout of
        returned window tensor. Only "torch.strided" (dense layout) is
        supported.
      * device ("torch.device", optional) -- the desired device of
        returned tensor. Default: if "None", uses the current device
        for the default tensor type (see
        "torch.set_default_tensor_type()"). "device" will be the CPU


for CPU tensor types and the current CUDA device for CUDA
        tensor types.
      * requires_grad (bool, optional) -- If autograd should
        record operations on the returned tensor. Default: "False".
   Returns:
      A 1-D tensor of size (\text{window_length},) containing the
      window
   Return type:
      Tensor


torch.cuda.set_streamtorch.cuda.set_stream(stream)
   Sets the current stream.This is a wrapper API to set the stream.
      Usage of this function is discouraged in favor of the "stream"
      context manager.
   Parameters:
      stream (Stream) -- selected stream. This function is a no-
      op if this argument is "None".


torch.equaltorch.equal(input, other) -> bool
   "True" if two tensors have the same size and elements, "False"
   otherwise.
   Example:
      >>> torch.equal(torch.tensor([1, 2]), torch.tensor([1, 2]))
      True


torch.i0torch.i0(input, *, out=None) -> Tensor
   Alias for "torch.special.i0()".