a matrix on the left by the inverse, as:
        linalg.solve(A, B) == linalg.inv(A) @ B  # When B is a matrix
     It is always preferred to use "solve()" when possible, as it is
     faster and more numerically stable than computing the inverse
     explicitly.
   See also:
     "torch.linalg.pinv()" computes the pseudoinverse (Moore-Penrose
     inverse) of matrices of any shape.
     "torch.linalg.solve()" computes "A".inv() @ "B" with a
     numerically stable algorithm.
   Parameters:
      A (Tensor) -- tensor of shape (, n, n) where *** is
      zero or more batch dimensions consisting of invertible matrices.
   Keyword Arguments:
      out (Tensor, optional) -- output tensor. Ignored if
      None. Default: None.
   Raises:
      RuntimeError* -- if the matrix "A" or any matrix in the batch
      of matrices "A" is not invertible.
   Examples:
      >>> A = torch.randn(4, 4)
      >>> Ainv = torch.linalg.inv(A)
      >>> torch.dist(A @ Ainv, torch.eye(4))


torch.dist(A @ Ainv, torch.eye(4))
      tensor(1.1921e-07)
      >>> A = torch.randn(2, 3, 4, 4)  # Batch of matrices
      >>> Ainv = torch.linalg.inv(A)
      >>> torch.dist(A @ Ainv, torch.eye(4))
      tensor(1.9073e-06)
      >>> A = torch.randn(4, 4, dtype=torch.complex128)  # Complex matrix
      >>> Ainv = torch.linalg.inv(A)
      >>> torch.dist(A @ Ainv, torch.eye(4))
      tensor(7.5107e-16, dtype=torch.float64)


ChannelShuffleclass torch.nn.ChannelShuffle(groups)
   Divide the channels in a tensor of shape (, C , H, W) into g
   groups and rearrange them as (, C \frac g, g, H, W), while keeping
   the original tensor shape.
   Parameters:
      groups (int) -- number of groups to divide channels in.
   Examples:
      >>> channel_shuffle = nn.ChannelShuffle(2)
      >>> input = torch.randn(1, 4, 2, 2)
      >>> print(input)
      [[[[1, 2],
         [3, 4]],
        [[5, 6],
         [7, 8]],
        [[9, 10],
         [11, 12]],
        [[13, 14],
         [15, 16]],
       ]]
      >>> output = channel_shuffle(input)
      >>> print(output)
      [[[[1, 2],
         [3, 4]],
        [[9, 10],
         [11, 12]],
        [[5, 6],
         [7, 8]],
        [[13, 14],
         [15, 16]],
       ]]


torch.gttorch.gt(input, other, , out=None) -> Tensor
   Computes \text{input} > \text{other} element-wise.
   The second argument can be a number or a tensor whose shape is
   broadcastable with the first argument.
   Parameters:
      * input (Tensor) -- the tensor to compare
      * other (Tensor or float) -- the tensor or value to
        compare
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Returns:
      A boolean tensor that is True where "input" is greater than
      "other" and False elsewhere
   Example:
      >>> torch.gt(torch.tensor([[1, 2], [3, 4]]), torch.tensor([[1, 1], [4, 4]]))
      tensor([[False, True], [False, False]])


Bilinearclass torch.nn.Bilinear(in1_features, in2_features, out_features, bias=True, device=None, dtype=None)
   Applies a bilinear transformation to the incoming data: y = x_1^T A
   x_2 + b
   Parameters:
      * in1_features (int) -- size of each first input sample
      * in2_features (int) -- size of each second input sample
      * out_features (int) -- size of each output sample
      * bias (bool) -- If set to False, the layer will not learn
        an additive bias. Default: "True"
   Shape:
      * Input1: (, H_{in1}) where H_{in1}=\text{in1_features} and *
        means any number of additional dimensions including none. All
        but the last dimension of the inputs should be the same.
      * Input2: (, H_{in2}) where H_{in2}=\text{in2_features}.
      * Output: (*, H_{out}) where H_{out}=\text{out_features} and
        all but the last dimension are the same shape as the input.
   Variables:


Variables:
      * weight (torch.Tensor) -- the learnable weights of the
        module of shape (\text{out_features}, \text{in1_features},
        \text{in2_features}). The values are initialized from
        \mathcal{U}(-\sqrt{k}, \sqrt{k}), where k =
        \frac{1}{\text{in1_features}}
      * bias -- the learnable bias of the module of shape
        (\text{out_features}). If "bias" is "True", the values are
        initialized from \mathcal{U}(-\sqrt{k}, \sqrt{k}), where k =
        \frac{1}{\text{in1_features}}
   Examples:
      >>> m = nn.Bilinear(20, 30, 40)
      >>> input1 = torch.randn(128, 20)
      >>> input2 = torch.randn(128, 30)
      >>> output = m(input1, input2)
      >>> print(output.size())
      torch.Size([128, 40])


torch.Tensor.logical_and_Tensor.logical_and_() -> Tensor
   In-place version of "logical_and()"


torch.arangetorch.arange(start=0, end, step=1, , out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
   Returns a 1-D tensor of size \left\lceil \frac{\text{end} -
   \text{start}}{\text{step}} \right\rceil with values from the
   interval "[start, end)" taken with common difference "step"
   beginning from start.
   Note that non-integer "step" is subject to floating point rounding
   errors when comparing against "end"; to avoid inconsistency, we
   advise adding a small epsilon to "end" in such cases.
      \text{out}{{i+1}} = \text{out} + \text{step}
   Parameters:
      * start (Number) -- the starting value for the set of
        points. Default: "0".
      * end (Number) -- the ending value for the set of points
      * step (Number) -- the gap between each pair of adjacent
        points. Default: "1".
   Keyword Arguments:
      * out (Tensor, optional*) -- the output tensor.


dtype ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default
        (see "torch.set_default_tensor_type()"). If dtype is not
        given, infer the data type from the other input arguments. If
        any of start, end, or stop are floating-point, the
        dtype is inferred to be the default dtype, see
        "get_default_dtype()". Otherwise, the dtype is inferred to
        be torch.int64.
layout ("torch.layout", optional) -- the desired layout of
    returned Tensor. Default: "torch.strided".
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".
   Example:
      >>> torch.arange(5)
      tensor([ 0,  1,  2,  3,  4])
      >>> torch.arange(1, 4)
      tensor([ 1,  2,  3])
      >>> torch.arange(1, 2.5, 0.5)
      tensor([ 1.0000,  1.5000,  2.0000])


torch.signal.windows.hanntorch.signal.windows.hann(M, , sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False)
   Computes the Hann window.
   The Hann window is defined as follows:
      w_n = \frac{1}{2}\ \left[1 - \cos \left( \frac{2 \pi n}{M - 1}
      \right)\right] = \sin^2 \left( \frac{\pi n}{M - 1} \right)
   The window is normalized to 1 (maximum value is 1). However, the 1
   doesn't appear if "M" is even and "sym" is True.
   Parameters:
      M (int) -- the length of the window. In other words, the
      number of points of the returned window.
   Keyword Arguments:
      * sym (bool, optional) -- If False, returns a
        periodic window suitable for use in spectral analysis. If
        True, returns a symmetric window suitable for use in filter
        design. Default: True.
      * dtype* ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default


(see "torch.set_default_tensor_type()").
      * layout ("torch.layout", optional) -- the desired layout of
        returned Tensor. Default: "torch.strided".
      * 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".
   Return type:
      Tensor
   Examples:
      >>> # Generates a symmetric Hann window.
      >>> torch.signal.windows.hann(10)
      tensor([0.0000, 0.1170, 0.4132, 0.7500, 0.9698, 0.9698, 0.7500, 0.4132, 0.1170, 0.0000])
      >>> # Generates a periodic Hann window.
      >>> torch.signal.windows.hann(10, sym=False)


torch.signal.windows.hann(10, sym=False)
      tensor([0.0000, 0.0955, 0.3455, 0.6545, 0.9045, 1.0000, 0.9045, 0.6545, 0.3455, 0.0955])


torch.maximumtorch.maximum(input, other, , out=None) -> Tensor
   Computes the element-wise maximum of "input" and "other".
   Note:
     If one of the elements being compared is a NaN, then that element
     is returned. "maximum()" is not supported for tensors with
     complex dtypes.
   Parameters:
      * input (Tensor) -- the input tensor.
      * other (Tensor) -- the second input tensor
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.tensor((1, 2, -1))
      >>> b = torch.tensor((3, 0, 4))
      >>> torch.maximum(a, b)
      tensor([3, 2, 4])


strict_fusionclass torch.jit.strict_fusion
   This class errors if not all nodes have been fused in inference, or
   symbolically differentiated in training.
   Example:
   Forcing fusion of additions.
      @torch.jit.script
      def foo(x):
          with torch.jit.strict_fusion():
              return x + x + x


Linearclass torch.nn.Linear(in_features, out_features, bias=True, device=None, dtype=None)
   Applies a linear transformation to the incoming data: y = xA^T + b
   This module supports TensorFloat32.
   On certain ROCm devices, when using float16 inputs this module will
   use different precision for backward.
   Parameters:
      * in_features (int) -- size of each input sample
      * out_features (int) -- size of each output sample
      * bias (bool) -- If set to "False", the layer will not
        learn an additive bias. Default: "True"
   Shape:
      * Input: (, H_{in}) where * means any number of dimensions
        including none and H_{in} = \text{in_features}.
      * Output: (, H_{out}) where all but the last dimension are the
        same shape as the input and H_{out} = \text{out_features}.
   Variables:
      * weight (torch.Tensor) -- the learnable weights of the
        module of shape (\text{out_features}, \text{in_features}).


The values are initialized from \mathcal{U}(-\sqrt{k},
        \sqrt{k}), where k = \frac{1}{\text{in_features}}
      * bias -- the learnable bias of the module of shape
        (\text{out_features}). If "bias" is "True", the values are
        initialized from \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
        \frac{1}{\text{in_features}}
   Examples:
      >>> m = nn.Linear(20, 30)
      >>> input = torch.randn(128, 20)
      >>> output = m(input)
      >>> print(output.size())
      torch.Size([128, 30])


torch.cumulative_trapezoidtorch.cumulative_trapezoid(y, x=None, , dx=None, dim=- 1) -> Tensor
   Cumulatively computes the trapezoidal rule along "dim". By default
   the spacing between elements is assumed to be 1, but "dx" can be
   used to specify a different constant spacing, and "x" can be used
   to specify arbitrary spacing along "dim".
   For more details, please read "torch.trapezoid()". The difference
   between "torch.trapezoid()" and this function is that,
   "torch.trapezoid()" returns a value for each integration, where as
   this function returns a cumulative value for every spacing within
   the integration. This is analogous to how .sum returns a value
   and .cumsum returns a cumulative sum.
   Parameters:
      * y (Tensor) -- Values to use when computing the
        trapezoidal rule.
      * x (Tensor*) -- If specified, defines spacing between
        values as specified above.
   Keyword Arguments:


Keyword Arguments:
      * dx (float) -- constant spacing between values. If
        neither "x" or "dx" are specified then this defaults to 1.
        Effectively multiplies the result by its value.
      * dim (int) -- The dimension along which to compute the
        trapezoidal rule. The last (inner-most) dimension by default.
   Examples:
      >>> # Cumulatively computes the trapezoidal rule in 1D, spacing is implicitly 1.
      >>> y = torch.tensor([1, 5, 10])
      >>> torch.cumulative_trapezoid(y)
      tensor([3., 10.5])
      >>> # Computes the same trapezoidal rule directly up to each element to verify
      >>> (1 + 5) / 2
      3.0
      >>> (1 + 10 + 10) / 2
      10.5
      >>> # Cumulatively computes the trapezoidal rule in 1D with constant spacing of 2
      >>> # NOTE: the result is the same as before, but multiplied by 2
      >>> torch.cumulative_trapezoid(y, dx=2)
      tensor([6., 21.])
      >>> # Cumulatively computes the trapezoidal rule in 1D with arbitrary spacing


x = torch.tensor([1, 3, 6])
      >>> torch.cumulative_trapezoid(y, x)
      tensor([6., 28.5])
      >>> # Computes the same trapezoidal rule directly up to each element to verify
      >>> ((3 - 1) * (1 + 5)) / 2
      6.0
      >>> ((3 - 1) * (1 + 5) + (6 - 3) * (5 + 10)) / 2
      28.5
      >>> # Cumulatively computes the trapezoidal rule for each row of a 3x3 matrix
      >>> y = torch.arange(9).reshape(3, 3)
      tensor([[0, 1, 2],
              [3, 4, 5],
              [6, 7, 8]])
      >>> torch.cumulative_trapezoid(y)
      tensor([[ 0.5,  2.],
              [ 3.5,  8.],
              [ 6.5, 14.]])
      >>> # Cumulatively computes the trapezoidal rule for each column of the matrix
      >>> torch.cumulative_trapezoid(y, dim=0)
      tensor([[ 1.5,  2.5,  3.5],
              [ 6.0,  8.0, 10.0]])
      >>> # Cumulatively computes the trapezoidal rule for each row of a 3x3 ones matrix
      >>> #   with the same arbitrary spacing
      >>> y = torch.ones(3, 3)


y = torch.ones(3, 3)
      >>> x = torch.tensor([1, 3, 6])
      >>> torch.cumulative_trapezoid(y, x)
      tensor([[2., 5.],
              [2., 5.],
              [2., 5.]])
      >>> # Cumulatively computes the trapezoidal rule for each row of a 3x3 ones matrix
      >>> #   with different arbitrary spacing per row
      >>> y = torch.ones(3, 3)
      >>> x = torch.tensor([[1, 2, 3], [1, 3, 5], [1, 4, 7]])
      >>> torch.cumulative_trapezoid(y, x)
      tensor([[1., 2.],
              [2., 4.],
              [3., 6.]])


BatchNorm2dclass torch.ao.nn.quantized.BatchNorm2d(num_features, eps=1e-05, momentum=0.1, device=None, dtype=None)
   This is the quantized version of "BatchNorm2d".


ParameterDictclass torch.nn.ParameterDict(parameters=None)
   Holds parameters in a dictionary.
   ParameterDict can be indexed like a regular Python dictionary, but
   Parameters it contains are properly registered, and will be visible
   by all Module methods. Other objects are treated as would be done
   by a regular Python dictionary
   "ParameterDict" is an ordered dictionary. "update()" with other
   unordered mapping types (e.g., Python's plain "dict") does not
   preserve the order of the merged mapping. On the other hand,
   "OrderedDict" or another "ParameterDict" will preserve their
   ordering.
   Note that the constructor, assigning an element of the dictionary
   and the "update()" method will convert any "Tensor" into
   "Parameter".
   Parameters:
      values (iterable, optional) -- a mapping (dictionary)
      of (string : Any) or an iterable of key-value pairs of type
      (string, Any)
   Example:
      class MyModule(nn.Module):
          def init(self):


def init(self):
              super(MyModule, self).init()
              self.params = nn.ParameterDict({
                      'left': nn.Parameter(torch.randn(5, 10)),
                      'right': nn.Parameter(torch.randn(5, 10))
              })
          def forward(self, x, choice):
              x = self.params[choice].mm(x)
              return x
   clear()
      Remove all items from the ParameterDict.
   copy()
      Returns a copy of this "ParameterDict" instance.
      Return type:
         ParameterDict
   fromkeys(keys, default=None)
      Return a new ParameterDict with the keys provided
      Parameters:
         * keys (iterable, string) -- keys to make the new
           ParameterDict from
         * default (Parameter, optional) -- value to set for
           all keys
      Return type:
         ParameterDict
   get(key, default=None)
      Return the parameter associated with key if present. Otherwise
      return default if provided, None if not.


return default if provided, None if not.
      Parameters:
         * key (str) -- key to get from the ParameterDict
         * default (Parameter, optional) -- value to return
           if key not present
      Return type:
         Any
   items()
      Return an iterable of the ParameterDict key/value pairs.
      Return type:
         Iterable[Tuple[str, Any]]
   keys()
      Return an iterable of the ParameterDict keys.
      Return type:
         Iterable[str]
   pop(key)
      Remove key from the ParameterDict and return its parameter.
      Parameters:
         key (str) -- key to pop from the ParameterDict
      Return type:
         Any
   popitem()
      Remove and return the last inserted (key, parameter) pair from
      the ParameterDict
      Return type:
         Tuple[str, Any]
   setdefault(key, default=None)
      If key is in the ParameterDict, return its value. If not, insert


key with a parameter default and return default. default
      defaults to None.
      Parameters:
         * key (str) -- key to set default for
         * default (Any) -- the parameter set to the key
      Return type:
         Any
   update(parameters)
      Update the "ParameterDict" with the key-value pairs from a
      mapping or an iterable, overwriting existing keys.
      Note:
        If "parameters" is an "OrderedDict", a "ParameterDict", or an
        iterable of key-value pairs, the order of new elements in it
        is preserved.
      Parameters:
         parameters (iterable) -- a mapping (dictionary) from
         string to "Parameter", or an iterable of key-value pairs of
         type (string, "Parameter")
   values()
      Return an iterable of the ParameterDict values.
      Return type:
         Iterable[Any]


torch.bitwise_andtorch.bitwise_and(input, other, , out=None) -> Tensor
   Computes the bitwise AND of "input" and "other". The input tensor
   must be of integral or Boolean types. For bool tensors, it computes
   the logical AND.
   Parameters:
      * input -- the first input tensor
      * other -- the second input tensor
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> torch.bitwise_and(torch.tensor([-1, -2, 3], dtype=torch.int8), torch.tensor([1, 0, 3], dtype=torch.int8))
      tensor([1, 0,  3], dtype=torch.int8)
      >>> torch.bitwise_and(torch.tensor([True, True, False]), torch.tensor([False, True, False]))
      tensor([ False, True, False])


torch.nn.functional.selutorch.nn.functional.selu(input, inplace=False) -> Tensor
   Applies element-wise, \text{SELU}(x) = scale * (\max(0,x) + \min(0,
   \alpha * (\exp(x) - 1))), with
   \alpha=1.6732632423543772848170429916717 and
   scale=1.0507009873554804934193349852946.
   See "SELU" for more details.
   Return type:
      Tensor


torch.view_as_realtorch.view_as_real(input) -> Tensor
   Returns a view of "input" as a real tensor. For an input complex
   tensor of "size" m1, m2, \dots, mi, this function returns a new
   real tensor of size m1, m2, \dots, mi, 2, where the last dimension
   of size 2 represents the real and imaginary components of complex
   numbers.
   Warning:
     "view_as_real()" is only supported for tensors with "complex
     dtypes".
   Parameters:
      input (Tensor) -- the input tensor.
   Example:
      >>> x=torch.randn(4, dtype=torch.cfloat)
      >>> x
      tensor([(0.4737-0.3839j), (-0.2098-0.6699j), (0.3470-0.9451j), (-0.5174-1.3136j)])
      >>> torch.view_as_real(x)
      tensor([[ 0.4737, -0.3839],
              [-0.2098, -0.6699],
              [ 0.3470, -0.9451],
              [-0.5174, -1.3136]])


torch.Tensor.sspaddmmTensor.sspaddmm(mat1, mat2, *, beta=1, alpha=1) -> Tensor
   See "torch.sspaddmm()"


torch.lesstorch.less(input, other, *, out=None) -> Tensor
   Alias for "torch.lt()".


torch.Tensor.bitwise_right_shiftTensor.bitwise_right_shift(other) -> Tensor
   See "torch.bitwise_right_shift()"


StreamContextclass torch.cuda.StreamContext(stream)
   Context-manager that selects a given stream.
   All CUDA kernels queued within its context will be enqueued on a
   selected stream.
   Parameters:
      Stream (Stream) -- selected stream. This manager is a no-
      op if it's "None".
   Note:
     Streams are per-device.


torch.Tensor.sgnTensor.sgn() -> Tensor
   See "torch.sgn()"


torch.fft.iffttorch.fft.ifft(input, n=None, dim=- 1, norm=None, , out=None) -> Tensor
   Computes the one dimensional inverse discrete Fourier transform of
   "input".
   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.
   Parameters:
      * input (Tensor) -- the input tensor
      * n (int, optional) -- Signal length. If given, the
        input will either be zero-padded or trimmed to this length
        before computing the IFFT.
      * dim (int, optional) -- The dimension along which to
        take the one dimensional IFFT.
      * norm (str, optional*) --
        Normalization mode. For the backward transform ("ifft()"),
        these correspond to:
        * ""forward"" - no normalization
        * ""backward"" - normalize by "1/n"
        * ""ortho"" - normalize by "1/sqrt(n)" (making the IFFT


orthonormal)
        Calling the forward transform ("fft()") with the same
        normalization mode will apply an overall normalization of
        "1/n" between the two transforms. This is required to make
        "ifft()" the exact inverse.
        Default is ""backward"" (normalize by "1/n").
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   -[ Example ]-

t = torch.tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j])
torch.fft.ifft(t)
   tensor([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])


torch.Tensor.frac_Tensor.frac_() -> Tensor
   In-place version of "frac()"


InstanceNorm1dclass torch.nn.InstanceNorm1d(num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False, device=None, dtype=None)
   Applies Instance Normalization over a 2D (unbatched) or 3D
   (batched) input as described in the paper Instance Normalization:
   The Missing Ingredient for Fast Stylization.
      y = \frac{x - \mathrm{E}[x]}{ \sqrt{\mathrm{Var}[x] + \epsilon}}
      * \gamma + \beta
   The mean and standard-deviation are calculated per-dimension
   separately for each object in a mini-batch. \gamma and \beta are
   learnable parameter vectors of size C (where C is the number of
   features or channels of the input) if "affine" is "True". The
   standard-deviation is calculated via the biased estimator,
   equivalent to torch.var(input, unbiased=False).
   By default, this layer uses instance statistics computed from input
   data in both training and evaluation modes.
   If "track_running_stats" is set to "True", during training this


layer keeps running estimates of its computed mean and variance,
   which are then used for normalization during evaluation. The
   running estimates are kept with a default "momentum" of 0.1.
   Note:
     This "momentum" argument is different from one used in optimizer
     classes and the conventional notion of momentum. Mathematically,
     the update rule for running statistics here is \hat{x}_\text{new}
     = (1 - \text{momentum}) \times \hat{x} + \text{momentum} \times
     x_t, where \hat{x} is the estimated statistic and x_t is the new
     observed value.
   Note:
     "InstanceNorm1d" and "LayerNorm" are very similar, but have some
     subtle differences. "InstanceNorm1d" is applied on each channel
     of channeled data like multidimensional time series, but
     "LayerNorm" is usually applied on entire sample and often in NLP
     tasks. Additionally, "LayerNorm" applies elementwise affine
     transform, while "InstanceNorm1d" usually don't apply affine
     transform.
   Parameters:


transform.
   Parameters:
      * num_features (int) -- number of features or channels C
        of the input
      * eps (float) -- a value added to the denominator for
        numerical stability. Default: 1e-5
      * momentum (float) -- the value used for the running_mean
        and running_var computation. Default: 0.1
      * affine (bool) -- a boolean value that when set to
        "True", this module has learnable affine parameters,
        initialized the same way as done for batch normalization.
        Default: "False".
      * track_running_stats (bool) -- a boolean value that when
        set to "True", this module tracks the running mean and
        variance, and when set to "False", this module does not track
        such statistics and always uses batch statistics in both
        training and eval modes. Default: "False"
   Shape:
      * Input: (N, C, L) or (C, L)
      * Output: (N, C, L) or (C, L) (same shape as input)
   Examples:


Examples:
      >>> # Without Learnable Parameters
      >>> m = nn.InstanceNorm1d(100)
      >>> # With Learnable Parameters
      >>> m = nn.InstanceNorm1d(100, affine=True)
      >>> input = torch.randn(20, 100, 40)
      >>> output = m(input)


TransformerEncoderclass torch.nn.TransformerEncoder(encoder_layer, num_layers, norm=None, enable_nested_tensor=True, mask_check=True)
   TransformerEncoder is a stack of N encoder layers. Users can build
   the BERT(https://arxiv.org/abs/1810.04805) model with corresponding
   parameters.
   Parameters:
      * encoder_layer -- an instance of the
        TransformerEncoderLayer() class (required).
      * num_layers -- the number of sub-encoder-layers in the
        encoder (required).
      * norm -- the layer normalization component (optional).
      * enable_nested_tensor -- if True, input will automatically
        convert to nested tensor (and convert back on output). This
        will improve the overall performance of TransformerEncoder
        when padding rate is high. Default: "True" (enabled).
   Examples::
      >>> encoder_layer = nn.TransformerEncoderLayer(d_model=512, nhead=8)
      >>> transformer_encoder = nn.TransformerEncoder(encoder_layer, num_layers=6)


src = torch.rand(10, 32, 512)
      >>> out = transformer_encoder(src)
   forward(src, mask=None, src_key_padding_mask=None, is_causal=None)
      Pass the input through the encoder layers in turn.
      Parameters:
         * src (Tensor) -- the sequence to the encoder
           (required).
         * mask (Optional[Tensor]) -- the mask for the src
           sequence (optional).
         * is_causal (Optional[bool]) -- If specified,
           applies a causal mask as mask (optional) and ignores
           attn_mask for computing scaled dot product attention.
           Default: "False".
         * src_key_padding_mask (Optional[Tensor]) -- the
           mask for the src keys per batch (optional).
      Return type:
         Tensor
      Shape:
         see the docs in Transformer class.


torch.atantorch.atan(input, , out=None) -> Tensor
   Returns a new tensor with the arctangent of the elements of
   "input".
      \text{out}{i} = \tan^{-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.2341,  0.2539, -0.6256, -0.6448])
      >>> torch.atan(a)
      tensor([ 0.2299,  0.2487, -0.5591, -0.5727])


LayerNormclass torch.ao.nn.quantized.LayerNorm(normalized_shape, weight, bias, scale, zero_point, eps=1e-05, elementwise_affine=True, device=None, dtype=None)
   This is the quantized version of "LayerNorm".
   Additional args:
      * scale - quantization scale of the output, type: double.
      * zero_point - quantization zero point of the output, type:
        long.


torch.nn.functional.embedding_bagtorch.nn.functional.embedding_bag(input, weight, offsets=None, max_norm=None, norm_type=2, scale_grad_by_freq=False, mode='mean', sparse=False, per_sample_weights=None, include_last_offset=False, padding_idx=None)
   Computes sums, means or maxes of bags of embeddings, without
   instantiating the intermediate embeddings.
   See "torch.nn.EmbeddingBag" for more details.
   Note:
     This operation may produce nondeterministic gradients when given
     tensors on a CUDA device. See Reproducibility for more
     information.
   Parameters:
      * input (LongTensor) -- Tensor containing bags of 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
      * offsets (LongTensor, optional) -- Only used when


"input" is 1D. "offsets" determines the starting index
        position of each bag (sequence) in "input".
      * 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" in 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". Note: this option is
        not supported when "mode="max"".
      * mode (str, optional) -- ""sum"", ""mean"" or
        ""max"". Specifies the way to reduce the bag. Default:
        ""mean""
      * 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. Note: this option is not supported when
        "mode="max"".
      * per_sample_weights (Tensor, optional) -- a tensor of
        float / double weights, or None to indicate all weights should
        be taken to be 1. If specified, "per_sample_weights" must have
        exactly the same shape as input and is treated as having the
        same "offsets", if those are not None.
      * include_last_offset (bool, optional) -- if "True",
        the size of offsets is equal to the number of bags + 1. The
        last element is the size of the input, or the ending index
        position of the last bag (sequence).
      * 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".


Note that the embedding vector at "padding_idx" is excluded
        from the reduction.
   Return type:
      Tensor
   Shape:
      * "input" (LongTensor) and "offsets" (LongTensor, optional)
        * If "input" is 2D of shape (B, N), it will be treated as
          "B" bags (sequences) each of fixed length "N", and this will
          return "B" values aggregated in a way depending on the
          "mode". "offsets" is ignored and required to be "None" in
          this case.
        * If "input" is 1D of shape (N), it will be treated as a
          concatenation of multiple bags (sequences). "offsets" is
          required to be a 1D tensor containing the starting index
          positions of each bag in "input". Therefore, for "offsets"
          of shape (B), "input" will be viewed as having "B" bags.
          Empty bags (i.e., having 0-length) will have returned
          vectors filled by zeros.
      * "weight" (Tensor): the learnable weights of the module of


shape (num_embeddings, embedding_dim)
      * "per_sample_weights" (Tensor, optional). Has the same shape as
        "input".
      * "output": aggregated embedding values of shape (B,
        embedding_dim)
   Examples:
      >>> # an Embedding module containing 10 tensors of size 3
      >>> embedding_matrix = torch.rand(10, 3)
      >>> # a batch of 2 samples of 4 indices each
      >>> input = torch.tensor([1, 2, 4, 5, 4, 3, 2, 9])
      >>> offsets = torch.tensor([0, 4])
      >>> F.embedding_bag(input, embedding_matrix, offsets)
      tensor([[ 0.3397,  0.3552,  0.5545],
              [ 0.5893,  0.4386,  0.5882]])
      >>> # example with padding_idx
      >>> embedding_matrix = torch.rand(10, 3)
      >>> input = torch.tensor([2, 2, 2, 2, 4, 3, 2, 9])
      >>> offsets = torch.tensor([0, 4])
      >>> F.embedding_bag(input, embedding_matrix, offsets, padding_idx=2, mode='sum')
      tensor([[ 0.0000,  0.0000,  0.0000],
              [-0.7082,  3.2145, -2.6251]])


torch.Tensor.cos_Tensor.cos_() -> Tensor
   In-place version of "cos()"


torch.Tensor.logaddexp2Tensor.logaddexp2(other) -> Tensor
   See "torch.logaddexp2()"


Identityclass torch.nn.Identity(args, kwargs)
   A placeholder identity operator that is argument-insensitive.
   Parameters:
      * args (Any) -- any argument (unused)
      * kwargs (Any) -- any keyword argument (unused)
   Shape:
      * Input: (), where * means any number of dimensions.
      * Output: (*), same shape as the input.
   Examples:
      >>> m = nn.Identity(54, unused_argument1=0.1, unused_argument2=False)
      >>> input = torch.randn(128, 20)
      >>> output = m(input)
      >>> print(output.size())
      torch.Size([128, 20])


torch.Tensor.positiveTensor.positive() -> Tensor
   See "torch.positive()"


torch.Tensor.logit_Tensor.logit_() -> Tensor
   In-place version of "logit()"


torch.jit.script_if_tracingtorch.jit.script_if_tracing(fn)
   Compiles "fn" when it is first called during tracing.
   "torch.jit.script" has a non-negligible start up time when it is
   first called due to lazy-initializations of many compiler builtins.
   Therefore you should not use it in library code. However, you may
   want to have parts of your library work in tracing even if they use
   control flow. In these cases, you should use
   "@torch.jit.script_if_tracing" to substitute for
   "torch.jit.script".
   Parameters:
      fn -- A function to compile.
   Returns:
      If called during tracing, a "ScriptFunction" created by
      torch.jit.script is returned. Otherwise, the original function
      fn is returned.


torch._foreach_sigmoidtorch._foreach_sigmoid(self: List[Tensor]) -> List[Tensor]
   Apply "torch.sigmoid()" to each Tensor of the input list.


torch.Tensor.eqTensor.eq(other) -> Tensor
   See "torch.eq()"


torch.Tensor.zero_Tensor.zero_() -> Tensor
   Fills "self" tensor with zeros.


torch.Tensor.splitTensor.split(split_size, dim=0)
   See "torch.split()"


Dropout3dclass torch.nn.Dropout3d(p=0.5, inplace=False)
   Randomly zero out entire channels (a channel is a 3D feature map,
   e.g., the j-th channel of the i-th sample in the batched input is a
   3D 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.Conv3d" modules.
   As described in the paper Efficient Object Localization Using
   Convolutional Networks , if adjacent pixels within feature maps are
   strongly correlated (as is normally the case in early convolution
   layers) then i.i.d. dropout will not regularize the activations and
   will otherwise just result in an effective learning rate decrease.
   In this case, "nn.Dropout3d()" will help promote independence
   between feature maps and should be used instead.
   Parameters:
      * p (float, optional) -- probability of an element to
        be zeroed.


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


ASGDclass torch.optim.ASGD(params, lr=0.01, lambd=0.0001, alpha=0.75, t0=1000000.0, weight_decay=0, foreach=None, maximize=False, differentiable=False)
   Implements Averaged Stochastic Gradient Descent.
   It has been proposed in Acceleration of stochastic approximation by
   averaging.
   Parameters:
      * params (iterable) -- iterable of parameters to optimize
        or dicts defining parameter groups
      * lr (float, optional) -- learning rate (default:
        1e-2)
      * lambd (float, optional) -- decay term (default:
        1e-4)
      * alpha (float, optional) -- power for eta update
        (default: 0.75)
      * t0 (float, optional) -- point at which to start
        averaging (default: 1e6)
      * weight_decay (float, optional) -- weight decay (L2
        penalty) (default: 0)
      * foreach (bool, optional) -- whether foreach
        implementation of optimizer is used. If unspecified by the


user (so foreach is None), we will try to use foreach over the
        for-loop implementation on CUDA, since it is usually
        significantly more performant. (default: None)
      * maximize (bool, optional) -- maximize the params
        based on the objective, instead of minimizing (default: False)
      * differentiable (bool, optional) -- whether autograd
        should occur through the optimizer step in training.
        Otherwise, the step() function runs in a torch.no_grad()
        context. Setting to True can impair performance, so leave it
        False if you don't intend to run autograd through this
        instance (default: False)
   add_param_group(param_group)
      Add a param group to the "Optimizer" s param_groups.
      This can be useful when fine tuning a pre-trained network as
      frozen layers can be made trainable and added to the "Optimizer"
      as training progresses.
      Parameters:


as training progresses.
      Parameters:
         param_group (dict) -- Specifies what Tensors should be
         optimized along with group specific optimization options.
   load_state_dict(state_dict)
      Loads the optimizer state.
      Parameters:
         state_dict (dict) -- optimizer state. Should be an
         object returned from a call to "state_dict()".
   register_step_post_hook(hook)
      Register an optimizer step post hook which will be called after
      optimizer step. It should have the following signature:
         hook(optimizer, args, kwargs) -> None
      The "optimizer" argument is the optimizer instance being used.
      Parameters:
         hook (Callable) -- The user defined hook to be
         registered.
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemoveableHandle"
   register_step_pre_hook(hook)


register_step_pre_hook(hook)
      Register an optimizer step pre hook which will be called before
      optimizer step. It should have the following signature:
         hook(optimizer, args, kwargs) -> None or modified args and kwargs
      The "optimizer" argument is the optimizer instance being used.
      If args and kwargs are modified by the pre-hook, then the
      transformed values are returned as a tuple containing the
      new_args and new_kwargs.
      Parameters:
         hook (Callable) -- The user defined hook to be
         registered.
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemoveableHandle"
   state_dict()
      Returns the state of the optimizer as a "dict".
      It contains two entries:
      * state - a dict holding current optimization state. Its content
           differs between optimizer classes.


differs between optimizer classes.
      * param_groups - a list containing all parameter groups where
        each
           parameter group is a dict
   zero_grad(set_to_none=False)
      Sets the gradients of all optimized "torch.Tensor" s to zero.
      Parameters:
         set_to_none (bool) -- instead of setting to zero, set
         the grads to None. This will in general have lower memory
         footprint, and can modestly improve performance. However, it
         changes certain behaviors. For example: 1. When the user
         tries to access a gradient and perform manual ops on it, a
         None attribute or a Tensor full of 0s will behave
         differently. 2. If the user requests
         "zero_grad(set_to_none=True)" followed by a backward pass,
         ".grad"s are guaranteed to be None for params that did not
         receive a gradient. 3. "torch.optim" optimizers have a
         different behavior if the gradient is 0 or None (in one case


it does the step with a gradient of 0 and in the other it
         skips the step altogether).


torch.squeezetorch.squeeze(input, dim=None) -> Tensor
   Returns a tensor with all specified dimensions of "input" of size
   1 removed.
   For example, if input is of shape: (A \times 1 \times B \times C
   \times 1 \times D) then the input.squeeze() will be of shape: (A
   \times B \times C \times D).
   When "dim" is given, a squeeze operation is done only in the given
   dimension(s). If input is of shape: (A \times 1 \times B),
   "squeeze(input, 0)" leaves the tensor unchanged, but
   "squeeze(input, 1)" will squeeze the tensor to the shape (A \times
   B).
   Note:
     The returned tensor shares the storage with the input tensor, so
     changing the contents of one will change the contents of the
     other.
   Warning:
     If the tensor has a batch dimension of size 1, then
     squeeze(input) will also remove the batch dimension, which can
     lead to unexpected errors. Consider specifying only the dims you
     wish to be squeezed.
   Parameters:


wish to be squeezed.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dim (int or tuple of ints, optional) --
        if given, the input will be squeezed
           only in the specified dimensions.
        Changed in version 2.0: "dim" now accepts tuples of
        dimensions.
   Example:
      >>> x = torch.zeros(2, 1, 2, 1, 2)
      >>> x.size()
      torch.Size([2, 1, 2, 1, 2])
      >>> y = torch.squeeze(x)
      >>> y.size()
      torch.Size([2, 2, 2])
      >>> y = torch.squeeze(x, 0)
      >>> y.size()
      torch.Size([2, 1, 2, 1, 2])
      >>> y = torch.squeeze(x, 1)
      >>> y.size()
      torch.Size([2, 2, 1, 2])
      >>> y = torch.squeeze(x, (1, 2, 3))
      torch.Size([2, 2, 2])


torch.cuda.empty_cachetorch.cuda.empty_cache()
   Releases all unoccupied cached memory currently held by the caching
   allocator so that those can be used in other GPU application and
   visible in nvidia-smi.
   Note:
     "empty_cache()" doesn't increase the amount of GPU memory
     available for PyTorch. However, it may help reduce fragmentation
     of GPU memory in certain cases. See Memory management for more
     details about GPU memory management.


torch.is_deterministic_algorithms_warn_only_enabledtorch.is_deterministic_algorithms_warn_only_enabled()
   Returns True if the global deterministic flag is set to warn only.
   Refer to "torch.use_deterministic_algorithms()" documentation for
   more details.


torch.Tensor.sub_Tensor.sub_(other, *, alpha=1) -> Tensor
   In-place version of "sub()"


torch.nn.utils.rnn.pack_sequencetorch.nn.utils.rnn.pack_sequence(sequences, enforce_sorted=True)
   Packs a list of variable length Tensors
   Consecutive call of the next functions: "pad_sequence",
   "pack_padded_sequence".
   "sequences" should be a list of Tensors of size "L x ", where L
   is the length of a sequence and *** is any number of trailing
   dimensions, including zero.
   For unsorted sequences, use enforce_sorted = False*. If
   "enforce_sorted" is "True", the sequences should be sorted in the
   order of decreasing length. "enforce_sorted = True" is only
   necessary for ONNX export.
   -[ Example ]-

from torch.nn.utils.rnn import pack_sequence
a = torch.tensor([1, 2, 3])
b = torch.tensor([4, 5])
c = torch.tensor([6])
pack_sequence([a, b, c])
   PackedSequence(data=tensor([1, 4, 6, 2, 5, 3]), batch_sizes=tensor([3, 2, 1]), sorted_indices=None, unsorted_indices=None)
   Parameters:


Parameters:
      * sequences (list[Tensor]) -- A list of sequences of
        decreasing length.
      * enforce_sorted (bool, optional) -- if "True", checks
        that the input contains sequences sorted by length in a
        decreasing order. If "False", this condition is not checked.
        Default: "True".
   Returns:
      a "PackedSequence" object
   Return type:
      PackedSequence


Sigmoidclass torch.ao.nn.quantized.Sigmoid(output_scale, output_zero_point)
   This is the quantized equivalent of "Sigmoid".
   Parameters:
      * scale -- quantization scale of the output tensor
      * zero_point -- quantization zero point of the output tensor


torch.Tensor.moveaxisTensor.moveaxis(source, destination) -> Tensor
   See "torch.moveaxis()"


torch.Tensor.gcd_Tensor.gcd_(other) -> Tensor
   In-place version of "gcd()"


torch.Tensor.meanTensor.mean(dim=None, keepdim=False, *, dtype=None) -> Tensor
   See "torch.mean()"


torch.Tensor.resize_as_Tensor.resize_as_(tensor, memory_format=torch.contiguous_format) -> Tensor
   Resizes the "self" tensor to be the same size as the specified
   "tensor". This is equivalent to "self.resize_(tensor.size())".
   Parameters:
      memory_format ("torch.memory_format", optional) -- the
      desired memory format of Tensor. Default:
      "torch.contiguous_format". Note that memory format of "self" is
      going to be unaffected if "self.size()" matches "tensor.size()".


torch.Tensor.roundTensor.round(decimals=0) -> Tensor
   See "torch.round()"


torch.empty_stridedtorch.empty_strided(size, stride, , dtype=None, layout=None, device=None, requires_grad=False, pin_memory=False) -> Tensor
   Creates a tensor with the specified "size" and "stride" and filled
   with undefined data.
   Warning:
     If the constructed tensor is "overlapped" (with multiple indices
     referring to the same element in memory) its behavior is
     undefined.
   Parameters:
      * size (tuple of python:int) -- the shape of the output
        tensor
      * stride (tuple of python:int) -- the strides of the
        output tensor
   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()").
      * layout ("torch.layout", optional) -- the desired layout of
        returned Tensor. Default: "torch.strided".
      * 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".
      * pin_memory (bool, optional) -- If set, returned
        tensor would be allocated in the pinned memory. Works only for
        CPU tensors. Default: "False".
   Example:
      >>> a = torch.empty_strided((2, 3), (1, 2))
      >>> a
      tensor([[8.9683e-44, 4.4842e-44, 5.1239e+07],
              [0.0000e+00, 0.0000e+00, 3.0705e-41]])
      >>> a.stride()
      (1, 2)
      >>> a.size()
      torch.Size([2, 3])


torch.Tensor.absoluteTensor.absolute() -> Tensor
   Alias for "abs()"


torch.nn.functional.ctc_losstorch.nn.functional.ctc_loss(log_probs, targets, input_lengths, target_lengths, blank=0, reduction='mean', zero_infinity=False)
   The Connectionist Temporal Classification loss.
   See "CTCLoss" for details.
   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.
   Note:
     This operation may produce nondeterministic gradients when given
     tensors on a CUDA device. See Reproducibility for more
     information.
   Parameters:
      * log_probs (Tensor) -- (T, N, C) or (T, C) where C =
        number of characters in alphabet including blank, *T = input


length, and N = batch size. The logarithmized probabilities
        of the outputs (e.g. obtained with
        "torch.nn.functional.log_softmax()").
      * targets (Tensor) -- (N, S) or (sum(target_lengths)).
        Targets cannot be blank. In the second form, the targets are
        assumed to be concatenated.
      * input_lengths (Tensor) -- (N) or (). Lengths of the
        inputs (must each be \leq T)
      * target_lengths (Tensor) -- (N) or (). Lengths of the
        targets
      * blank (int, optional) -- Blank label. Default 0.
      * reduction (str, optional) -- Specifies the reduction
        to apply to the output: "'none'" | "'mean'" | "'sum'".
        "'none'": no reduction will be applied, "'mean'": the output
        losses will be divided by the target lengths and then the mean
        over the batch is taken, "'sum'": the output will be summed.
        Default: "'mean'"
      * zero_infinity (bool, optional*) -- Whether to zero


infinite losses and the associated gradients. Default: "False"
        Infinite losses mainly occur when the inputs are too short to
        be aligned to the targets.
   Return type:
      Tensor
   Example:
      >>> log_probs = torch.randn(50, 16, 20).log_softmax(2).detach().requires_grad_()
      >>> targets = torch.randint(1, 20, (16, 30), dtype=torch.long)
      >>> input_lengths = torch.full((16,), 50, dtype=torch.long)
      >>> target_lengths = torch.randint(10, 30, (16,), dtype=torch.long)
      >>> loss = F.ctc_loss(log_probs, targets, input_lengths, target_lengths)
      >>> loss.backward()


torch.mmtorch.mm(input, mat2, *, out=None) -> Tensor
   Performs a matrix multiplication of the matrices "input" and
   "mat2".
   If "input" is a (n \times m) tensor, "mat2" is a (m \times p)
   tensor, "out" will be a (n \times p) tensor.
   Note:
     This function does not broadcast. For broadcasting matrix
     products, see "torch.matmul()".
   Supports strided and sparse 2-D tensors as inputs, autograd with
   respect to strided inputs.
   This operation has support for arguments with sparse layouts. If
   "out" is provided it's layout will be used. Otherwise, the result
   layout will be deduced from that of "input".
   Warning:
     Sparse support is a beta feature and some layout(s)/dtype/device
     combinations may not be supported, or may not have autograd
     support. If you notice missing functionality please open a
     feature request.
   This operator supports TensorFloat32.
   On certain ROCm devices, when using float16 inputs this module will


use different precision for backward.
   Parameters:
      * input (Tensor) -- the first matrix to be matrix
        multiplied
      * mat2 (Tensor) -- the second matrix to be matrix
        multiplied
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   Example:
      >>> mat1 = torch.randn(2, 3)
      >>> mat2 = torch.randn(3, 3)
      >>> torch.mm(mat1, mat2)
      tensor([[ 0.4851,  0.5037, -0.3633],
              [-0.0760, -3.6705,  2.4784]])


torch.letorch.le(input, other, , out=None) -> Tensor
   Computes \text{input} \leq \text{other} element-wise.
   The second argument can be a number or a tensor whose shape is
   broadcastable with the first argument.
   Parameters:
      * input (Tensor) -- the tensor to compare
      * other (Tensor or Scalar) -- the tensor or value to
        compare
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Returns:
      A boolean tensor that is True where "input" is less than or
      equal to "other" and False elsewhere
   Example:
      >>> torch.le(torch.tensor([[1, 2], [3, 4]]), torch.tensor([[1, 1], [4, 4]]))
      tensor([[True, False], [True, True]])


torch.Tensor.imagTensor.imag
   Returns a new tensor containing imaginary values of the "self"
   tensor. The returned tensor and "self" share the same underlying
   storage.
   Warning:
     "imag()" is only supported for tensors with complex dtypes.
   Example::
      >>> x=torch.randn(4, dtype=torch.cfloat)
      >>> x
      tensor([(0.3100+0.3553j), (-0.5445-0.7896j), (-1.6492-0.0633j), (-0.0638-0.8119j)])
      >>> x.imag
      tensor([ 0.3553, -0.7896, -0.0633, -0.8119])


torch.nn.utils.prune.identitytorch.nn.utils.prune.identity(module, name)
   Applies pruning reparametrization to the tensor corresponding to
   the parameter called "name" in "module" without actually pruning
   any units. Modifies module in place (and also return the modified
   module) by:
   1. adding a named buffer called "name+'_mask'" corresponding to the
      binary mask applied to the parameter "name" by the pruning
      method.
   2. replacing the parameter "name" by its pruned version, while the
      original (unpruned) parameter is stored in a new parameter named
      "name+'_orig'".
   Note:
     The mask is a tensor of ones.
   Parameters:
      * module (nn.Module) -- module containing the tensor to
        prune.
      * name (str) -- parameter name within "module" on which
        pruning will act.
   Returns:
      modified (i.e. pruned) version of the input module
   Return type:
      module (nn.Module)
   -[ Examples ]-


module (nn.Module)
   -[ Examples ]-

m = prune.identity(nn.Linear(2, 3), 'bias')
print(m.bias_mask)
   tensor([1., 1., 1.])


torch.Tensor.not_equalTensor.not_equal(other) -> Tensor
   See "torch.not_equal()".


Mishclass torch.nn.Mish(inplace=False)
   Applies the Mish function, element-wise. Mish: A Self Regularized
   Non-Monotonic Neural Activation Function.
      \text{Mish}(x) = x * \text{Tanh}(\text{Softplus}(x))
   Note:
     See Mish: A Self Regularized Non-Monotonic Neural Activation
     Function
   Shape:
      * Input: (), where * means any number of dimensions.
      * Output: (), same shape as the input.
   [image]
   Examples:
      >>> m = nn.Mish()
      >>> input = torch.randn(2)
      >>> output = m(input)


torch.nn.functional.elu_torch.nn.functional.elu_(input, alpha=1.) -> Tensor
   In-place version of "elu()".


torch.costorch.cos(input, , out=None) -> Tensor
   Returns a new tensor with the cosine  of the elements of "input".
      \text{out}{i} = \cos(\text{input})
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(4)
      >>> a
      tensor([ 1.4309,  1.2706, -0.8562,  0.9796])
      >>> torch.cos(a)
      tensor([ 0.1395,  0.2957,  0.6553,  0.5574])


torch.Tensor.addr_Tensor.addr_(vec1, vec2, *, beta=1, alpha=1) -> Tensor
   In-place version of "addr()"


torch.logittorch.logit(input, eps=None, *, out=None) -> Tensor
   Alias for "torch.special.logit()".


torch.Tensor.ne_Tensor.ne_(other) -> Tensor
   In-place version of "ne()".


torch.Tensor.renormTensor.renorm(p, dim, maxnorm) -> Tensor
   See "torch.renorm()"


torch.nn.functional.l1_losstorch.nn.functional.l1_loss(input, target, size_average=None, reduce=None, reduction='mean') -> Tensor
   Function that takes the mean element-wise absolute value
   difference.
   See "L1Loss" for details.
   Return type:
      Tensor


torch.nn.functional.celutorch.nn.functional.celu(input, alpha=1., inplace=False) -> Tensor
   Applies element-wise, \text{CELU}(x) = \max(0,x) + \min(0, \alpha *
   (\exp(x/\alpha) - 1)).
   See "CELU" for more details.
   Return type:
      Tensor


torch.cuda.jiterator._create_multi_output_jit_fntorch.cuda.jiterator._create_multi_output_jit_fn(code_string, num_outputs, kwargs)
   Create a jiterator-generated cuda kernel for an elementwise op that
   supports returning one or more outputs.
   Parameters:
      * code_string (str) -- CUDA code string to be compiled by
        jiterator. The entry functor must return value by reference.
      * num_outputs (int) -- number of outputs return by the
        kernel
      * kwargs (*Dict, optional) -- Keyword arguments for
        generated function
   Return type:
      Callable*
   Example:
      code_string = "template  void my_kernel(T x, T y, T alpha, T& out) { out = -x + alpha * y; }"
      jitted_fn = create_jit_fn(code_string, alpha=1.0)
      a = torch.rand(3, device='cuda')
      b = torch.rand(3, device='cuda')
      # invoke jitted function like a regular python function
      result = jitted_fn(a, b, alpha=3.14)


result = jitted_fn(a, b, alpha=3.14)
   Warning:
     This API is in beta and may change in future releases.
   Warning:
     This API only supports up to 8 inputs and 8 outputs


torch.Tensor.sinTensor.sin() -> Tensor
   See "torch.sin()"


LazyConv3dclass torch.nn.LazyConv3d(out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
   A "torch.nn.Conv3d" module with lazy initialization of the
   "in_channels" argument of the "Conv3d" 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.Conv3d" and "torch.nn.modules.lazy.LazyModuleMixin"
   cls_to_become
      alias of "Conv3d"


torch.gertorch.ger(input, vec2, *, out=None) -> Tensor
   Alias of "torch.outer()".
   Warning:
     This function is deprecated and will be removed in a future
     PyTorch release. Use "torch.outer()" instead.


torch.Tensor.expm1Tensor.expm1() -> Tensor
   See "torch.expm1()"


torch.nn.functional.conv_transpose2dtorch.nn.functional.conv_transpose2d(input, weight, bias=None, stride=1, padding=0, output_padding=0, groups=1, dilation=1) -> Tensor
   Applies a 2D transposed convolution operator over an input image
   composed of several input planes, sometimes also called
   "deconvolution".
   This operator supports TensorFloat32.
   See "ConvTranspose2d" 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} , iH , iW)


\text{in_channels} , iH , iW)
      * weight -- filters of shape (\text{in_channels} ,
        \frac{\text{out_channels}}{\text{groups}} , kH , 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 "(sH, 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 "(padH, 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_padH, 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 "(dH, dW)". Default: 1
   Examples:
      >>> # With square kernels and equal stride
      >>> inputs = torch.randn(1, 4, 5, 5)
      >>> weights = torch.randn(4, 8, 3, 3)
      >>> F.conv_transpose2d(inputs, weights, padding=1)


torch.nn.utils.parametrize.remove_parametrizationstorch.nn.utils.parametrize.remove_parametrizations(module, tensor_name, leave_parametrized=True)
   Removes the parametrizations on a tensor in a module.
   * If "leave_parametrized=True", "module[tensor_name]" will be set
     to its current output. In this case, the parametrization shall
     not change the "dtype" of the tensor.
   * If "leave_parametrized=False", "module[tensor_name]" will be set
     to the unparametrised tensor in
     "module.parametrizations[tensor_name].original". This is only
     possible when the parametrization depends on just one tensor.
   Parameters:
      * module (nn.Module) -- module from which remove the
        parametrization
      * tensor_name (str) -- name of the parametrization to be
        removed
      * leave_parametrized (bool, optional) -- leave the
        attribute "tensor_name" parametrized. Default: "True"
   Returns:
      module


Returns:
      module
   Return type:
      Module
   Raises:
      * ValueError -- if "module[tensor_name]" is not parametrized
      * ValueError -- if "leave_parametrized=False" and the
        parametrization depends on several tensors


torch.Tensor.q_per_channel_axisTensor.q_per_channel_axis() -> int
   Given a Tensor quantized by linear (affine) per-channel
   quantization, returns the index of dimension on which per-channel
   quantization is applied.


torch.Tensor.triu_Tensor.triu_(diagonal=0) -> Tensor
   In-place version of "triu()"


RandomUnstructuredclass torch.nn.utils.prune.RandomUnstructured(amount)
   Prune (currently unpruned) units in a tensor at random.
   Parameters:
      * 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.
   classmethod apply(module, name, amount)
      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.
   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)
   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").


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:
         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!


RNNCellclass torch.nn.RNNCell(input_size, hidden_size, bias=True, nonlinearity='tanh', device=None, dtype=None)
   An Elman RNN cell with tanh or ReLU non-linearity.
      h' = \tanh(W_{ih} x + b_{ih}  +  W_{hh} h + b_{hh})
   If "nonlinearity" is 'relu', then ReLU is used in place of tanh.
   Parameters:
      * input_size (int) -- The number of expected features in
        the input x
      * hidden_size (int) -- The number of features in the
        hidden state h
      * bias (bool) -- If "False", then the layer does not use
        bias weights b_ih and b_hh. Default: "True"
      * nonlinearity (str) -- The non-linearity to use. Can be
        either "'tanh'" or "'relu'". Default: "'tanh'"
   Inputs: input, hidden
      * input: tensor containing input features
      * hidden: tensor containing the initial hidden state
        Defaults to zero if not provided.
   Outputs: h'
      * h' of shape (batch, hidden_size): tensor containing the


next hidden state for each element in the batch
   Shape:
      * input: (N, H_{in}) or (H_{in}) tensor containing input
        features where H_{in} = input_size.
      * hidden: (N, H_{out}) or (H_{out}) tensor containing the
        initial hidden state where H_{out} = hidden_size. Defaults
        to zero if not provided.
      * output: (N, H_{out}) or (H_{out}) tensor containing the next
        hidden state.
   Variables:
      * weight_ih (torch.Tensor) -- the learnable input-hidden
        weights, of shape (hidden_size, input_size)
      * weight_hh (torch.Tensor) -- the learnable hidden-hidden
        weights, of shape (hidden_size, hidden_size)
      * bias_ih -- the learnable input-hidden bias, of shape
        (hidden_size)
      * bias_hh -- the learnable hidden-hidden bias, of shape
        (hidden_size)
   Note:
     All the weights and biases are initialized from
     \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
     \frac{1}{\text{hidden_size}}


\frac{1}{\text{hidden_size}}
   Examples:
      >>> rnn = nn.RNNCell(10, 20)
      >>> input = torch.randn(6, 3, 10)
      >>> hx = torch.randn(3, 20)
      >>> output = []
      >>> for i in range(6):
      ...     hx = rnn(input[i], hx)
      ...     output.append(hx)


torch.Tensor.rsqrtTensor.rsqrt() -> Tensor
   See "torch.rsqrt()"


torch.diagonal_scattertorch.diagonal_scatter(input, src, offset=0, dim1=0, dim2=1) -> Tensor
   Embeds the values of the "src" tensor into "input" along the
   diagonal elements of "input", with respect to "dim1" and "dim2".
   This function returns a tensor with fresh storage; it does not
   return a view.
   The argument "offset" controls which diagonal to consider:
   * If "offset" = 0, it is the main diagonal.
   * If "offset" > 0, it is above the main diagonal.
   * If "offset" < 0, it is below the main diagonal.
   Parameters:
      * input (Tensor) -- the input tensor. Must be at least
        2-dimensional.
      * src (Tensor) -- the tensor to embed into "input".
      * offset (int, optional) -- which diagonal to
        consider. Default: 0 (main diagonal).
      * dim1 (int, optional) -- first dimension with respect
        to which to take diagonal. Default: 0.
      * dim2 (int, optional) -- second dimension with


respect to which to take diagonal. Default: 1.
   Note:
     "src" must be of the proper size in order to be embedded into
     "input". Specifically, it should have the same shape as
     "torch.diagonal(input, offset, dim1, dim2)"
   Examples:
      >>> a = torch.zeros(3, 3)
      >>> a
      tensor([[0., 0., 0.],
              [0., 0., 0.],
              [0., 0., 0.]])
      >>> torch.diagonal_scatter(a, torch.ones(3), 0)
      tensor([[1., 0., 0.],
              [0., 1., 0.],
              [0., 0., 1.]])
      >>> torch.diagonal_scatter(a, torch.ones(2), 1)
      tensor([[0., 1., 0.],
              [0., 0., 1.],
              [0., 0., 0.]])


torch.nn.utils.prune.l1_unstructuredtorch.nn.utils.prune.l1_unstructured(module, name, amount, importance_scores=None)
   Prunes tensor corresponding to parameter called "name" in "module"
   by removing the specified amount of (currently unpruned) units
   with the lowest L1-norm. Modifies module in place (and also return
   the modified module) by:
   1. adding a named buffer called "name+'_mask'" corresponding to the
      binary mask applied to the parameter "name" by the pruning
      method.
   2. replacing the parameter "name" by its pruned version, while the
      original (unpruned) parameter is stored in a new parameter named
      "name+'_orig'".
   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.
   Returns:
      modified (i.e. pruned) version of the input module
   Return type:
      module (nn.Module)
   -[ Examples ]-

m = prune.l1_unstructured(nn.Linear(2, 3), 'weight', amount=0.2)
m.state_dict().keys()
   odict_keys(['bias', 'weight_orig', 'weight_mask'])


torch.Tensor.matrix_expTensor.matrix_exp() -> Tensor
   See "torch.matrix_exp()"


torch.lgammatorch.lgamma(input, , out=None) -> Tensor
   Computes the natural logarithm of the absolute value of the gamma
   function on "input".
      \text{out}{i} = \ln \Gamma(|\text{input}|)
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.arange(0.5, 2, 0.5)
      >>> torch.lgamma(a)
      tensor([ 0.5724,  0.0000, -0.1208])


torch.gathertorch.gather(input, dim, index, , sparse_grad=False, out=None) -> Tensor
   Gathers values along an axis specified by dim.
   For a 3-D tensor the output is specified by:
      out[i][j][k] = input[index[i][j][k]][j][k]  # if dim == 0
      out[i][j][k] = input[i][index[i][j][k]][k]  # if dim == 1
      out[i][j][k] = input[i][j][index[i][j][k]]  # if dim == 2
   "input" and "index" must have the same number of dimensions. It is
   also required that "index.size(d) <= input.size(d)" for all
   dimensions "d != dim".  "out" will have the same shape as "index".
   Note that "input" and "index" do not broadcast against each other.
   Parameters:
      * input (Tensor) -- the source tensor
      * dim (int) -- the axis along which to index
      * index (LongTensor) -- the indices of elements to gather
   Keyword Arguments:
      * sparse_grad (bool, optional*) -- If "True", gradient
        w.r.t. "input" will be a sparse tensor.


w.r.t. "input" will be a sparse tensor.
      * out (Tensor, optional) -- the destination tensor
   Example:
      >>> t = torch.tensor([[1, 2], [3, 4]])
      >>> torch.gather(t, 1, torch.tensor([[0, 0], [1, 0]]))
      tensor([[ 1,  1],
              [ 4,  3]])


torch.quantize_per_channeltorch.quantize_per_channel(input, scales, zero_points, axis, dtype) -> Tensor
   Converts a float tensor to a per-channel quantized tensor with
   given scales and zero points.
   Parameters:
      * input (Tensor) -- float tensor to quantize
      * scales (Tensor) -- float 1D tensor of scales to use,
        size should match "input.size(axis)"
      * zero_points (int) -- integer 1D tensor of offset to use,
        size should match "input.size(axis)"
      * axis (int) -- dimension on which apply per-channel
        quantization
      * dtype ("torch.dtype") -- the desired data type of returned
        tensor. Has to be one of the quantized dtypes: "torch.quint8",
        "torch.qint8", "torch.qint32"
   Returns:
      A newly quantized tensor
   Return type:
      Tensor
   Example:
      >>> x = torch.tensor([[-1.0, 0.0], [1.0, 2.0]])


torch.quantize_per_channel(x, torch.tensor([0.1, 0.01]), torch.tensor([10, 0]), 0, torch.quint8)
      tensor([[-1.,  0.],
              [ 1.,  2.]], size=(2, 2), dtype=torch.quint8,
             quantization_scheme=torch.per_channel_affine,
             scale=tensor([0.1000, 0.0100], dtype=torch.float64),
             zero_point=tensor([10,  0]), axis=0)
      >>> torch.quantize_per_channel(x, torch.tensor([0.1, 0.01]), torch.tensor([10, 0]), 0, torch.quint8).int_repr()
      tensor([[  0,  10],
              [100, 200]], dtype=torch.uint8)


torch.signal.windows.blackmantorch.signal.windows.blackman(M, , sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False)
   Computes the Blackman window.
   The Blackman window is defined as follows:
      w_n = 0.42 - 0.5 \cos \left( \frac{2 \pi n}{M - 1} \right) +
      0.08 \cos \left( \frac{4 \pi n}{M - 1} \right)
   The window is normalized to 1 (maximum value is 1). However, the 1
   doesn't appear if "M" is even and "sym" is True.
   Parameters:
      M (int) -- the length of the window. In other words, the
      number of points of the returned window.
   Keyword Arguments:
      * sym (bool, optional) -- If False, returns a
        periodic window suitable for use in spectral analysis. If
        True, returns a symmetric window suitable for use in filter
        design. Default: True.
      * dtype* ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default


(see "torch.set_default_tensor_type()").
      * layout ("torch.layout", optional) -- the desired layout of
        returned Tensor. Default: "torch.strided".
      * 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".
   Return type:
      Tensor
   Examples:
      >>> # Generates a symmetric Blackman window.
      >>> torch.signal.windows.blackman(5)
      tensor([-1.4901e-08,  3.4000e-01,  1.0000e+00,  3.4000e-01, -1.4901e-08])
      >>> # Generates a periodic Blackman window.
      >>> torch.signal.windows.blackman(5, sym=False)


tensor([-1.4901e-08,  2.0077e-01,  8.4923e-01,  8.4923e-01,  2.0077e-01])


torch.nn.functional.softsigntorch.nn.functional.softsign(input) -> Tensor
   Applies element-wise, the function \text{SoftSign}(x) = \frac{x}{1
   + |x|}
   See "Softsign" for more details.


Eventclass torch.cuda.Event(enable_timing=False, blocking=False, interprocess=False)
   Wrapper around a CUDA event.
   CUDA events are synchronization markers that can be used to monitor
   the device's progress, to accurately measure timing, and to
   synchronize CUDA streams.
   The underlying CUDA events are lazily initialized when the event is
   first recorded or exported to another process. After creation, only
   streams on the same device may record the event. However, streams
   on any device can wait on the event.
   Parameters:
      * enable_timing (bool, optional) -- indicates if the
        event should measure time (default: "False")
      * blocking (bool, optional) -- if "True", "wait()"
        will be blocking (default: "False")
      * interprocess (bool) -- if "True", the event can be
        shared between processes (default: "False")
   elapsed_time(end_event)
      Returns the time elapsed in milliseconds after the event was


recorded and before the end_event was recorded.
   classmethod from_ipc_handle(device, handle)
      Reconstruct an event from an IPC handle on the given device.
   ipc_handle()
      Returns an IPC handle of this event. If not recorded yet, the
      event will use the current device.
   query()
      Checks if all work currently captured by event has completed.
      Returns:
         A boolean indicating if all work currently captured by event
         has completed.
   record(stream=None)
      Records the event in a given stream.
      Uses "torch.cuda.current_stream()" if no stream is specified.
      The stream's device must match the event's device.
   synchronize()
      Waits for the event to complete.
      Waits until the completion of all work currently captured in
      this event. This prevents the CPU thread from proceeding until
      the event completes.
         Note:
           This is a wrapper around "cudaEventSynchronize()": see CUDA
           Event documentation for more info.


Event documentation for more info.
   wait(stream=None)
      Makes all future work submitted to the given stream wait for
      this event.
      Use "torch.cuda.current_stream()" if no stream is specified.
      Note:
        This is a wrapper around "cudaStreamWaitEvent()": see CUDA
        Event documentation for more info.


torch.argsorttorch.argsort(input, dim=- 1, descending=False, stable=False) -> Tensor
   Returns the indices that sort a tensor along a given dimension in
   ascending order by value.
   This is the second value returned by "torch.sort()".  See its
   documentation for the exact semantics of this method.
   If "stable" is "True" then the sorting routine becomes stable,
   preserving the order of equivalent elements. If "False", the
   relative order of values which compare equal is not guaranteed.
   "True" is slower.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dim (int, optional) -- the dimension to sort along
      * descending (bool, optional) -- controls the sorting
        order (ascending or descending)
      * stable (bool, optional) -- controls the relative
        order of equivalent elements
   Example:
      >>> a = torch.randn(4, 4)
      >>> a
      tensor([[ 0.0785,  1.5267, -0.8521,  0.4065],


[ 0.1598,  0.0788, -0.0745, -1.2700],
              [ 1.2208,  1.0722, -0.7064,  1.2564],
              [ 0.0669, -0.2318, -0.8229, -0.9280]])
      >>> torch.argsort(a, dim=1)
      tensor([[2, 0, 3, 1],
              [3, 2, 1, 0],
              [2, 1, 0, 3],
              [3, 2, 1, 0]])


torch.is_grad_enabledtorch.is_grad_enabled()
   Returns True if grad mode is currently enabled.


CosineEmbeddingLossclass torch.nn.CosineEmbeddingLoss(margin=0.0, size_average=None, reduce=None, reduction='mean')
   Creates a criterion that measures the loss given input tensors x_1,
   x_2 and a Tensor label y with values 1 or -1. This is used for
   measuring whether two inputs are similar or dissimilar, using the
   cosine similarity, and is typically used for learning nonlinear
   embeddings or semi-supervised learning.
   The loss function for each sample is:
      \text{loss}(x, y) = \begin{cases} 1 - \cos(x_1, x_2), & \text{if
      } y = 1 \ \max(0, \cos(x_1, x_2) - \text{margin}), & \text{if }
      y = -1 \end{cases}
   Parameters:
      * margin (float, optional) -- Should be a number from
        -1 to 1, 0 to 0.5 is suggested. If "margin" is missing, the
        default value is 0.
      * 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:
      * Input1: (N, D) or (D), where N is the batch size and D is
        the embedding dimension.
      * Input2: (N, D) or (D), same shape as Input1.
      * Target: (N) or ().
      * Output: If "reduction" is "'none'", then (N), otherwise
        scalar.


torch.arccoshtorch.arccosh(input, *, out=None) -> Tensor
   Alias for "torch.acosh()".


ConvReLU2dclass torch.ao.nn.intrinsic.qat.ConvReLU2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', qconfig=None)
   A ConvReLU2d module is a fused module of Conv2d and ReLU, attached
   with FakeQuantize modules for weight for quantization aware
   training.
   We combined the interface of "Conv2d" and "BatchNorm2d".
   Variables:
      weight_fake_quant -- fake quant module for weight


torch.vstacktorch.vstack(tensors, , out=None) -> Tensor
   Stack tensors in sequence vertically (row wise).
   This is equivalent to concatenation along the first axis after all
   1-D tensors have been reshaped by "torch.atleast_2d()".
   Parameters:
      tensors (sequence of Tensors) -- sequence of tensors to
      concatenate
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.tensor([1, 2, 3])
      >>> b = torch.tensor([4, 5, 6])
      >>> torch.vstack((a,b))
      tensor([[1, 2, 3],
              [4, 5, 6]])
      >>> a = torch.tensor([[1],[2],[3]])
      >>> b = torch.tensor([[4],[5],[6]])
      >>> torch.vstack((a,b))
      tensor([[1],
              [2],
              [3],
              [4],
              [5],
              [6]])


torch.fliptorch.flip(input, dims) -> Tensor
   Reverse the order of an n-D tensor along given axis in dims.
   Note:
     torch.flip makes a copy of "input"'s data. This is different
     from NumPy's np.flip, which returns a view in constant time.
     Since copying a tensor's data is more work than viewing that
     data, torch.flip is expected to be slower than np.flip.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dims (a list or tuple) -- axis to flip on
   Example:
      >>> x = torch.arange(8).view(2, 2, 2)
      >>> x
      tensor([[[ 0,  1],
               [ 2,  3]],
              [[ 4,  5],
               [ 6,  7]]])
      >>> torch.flip(x, [0, 1])
      tensor([[[ 6,  7],
               [ 4,  5]],
              [[ 2,  3],
               [ 0,  1]]])


torch.Tensor.frexpTensor.frexp(input) -> (Tensor mantissa, Tensor exponent)
   See "torch.frexp()"


torch.mediantorch.median(input) -> Tensor
   Returns the median of the values in "input".
   Note:
     The median is not unique for "input" tensors with an even number
     of elements. In this case the lower of the two medians is
     returned. To compute the mean of both medians, use
     "torch.quantile()" with "q=0.5" instead.
   Warning:
     This function produces deterministic (sub)gradients unlike
     "median(dim=0)"
   Parameters:
      input (Tensor) -- the input tensor.
   Example:
      >>> a = torch.randn(1, 3)
      >>> a
      tensor([[ 1.5219, -1.5212,  0.2202]])
      >>> torch.median(a)
      tensor(0.2202)
   torch.median(input, dim=- 1, keepdim=False, *, out=None)
   Returns a namedtuple "(values, indices)" where "values" contains
   the median of each row of "input" in the dimension "dim", and
   "indices" contains the index of the median values found in the
   dimension "dim".
   By default, "dim" is the last dimension of the "input" tensor.


If "keepdim" is "True", the output tensors are of the same size as
   "input" except in the dimension "dim" where they are of size 1.
   Otherwise, "dim" is squeezed (see "torch.squeeze()"), resulting in
   the outputs tensor having 1 fewer dimension than "input".
   Note:
     The median is not unique for "input" tensors with an even number
     of elements in the dimension "dim". In this case the lower of the
     two medians is returned. To compute the mean of both medians in
     "input", use "torch.quantile()" with "q=0.5" instead.
   Warning:
     "indices" does not necessarily contain the first occurrence of
     each median value found, unless it is unique. The exact
     implementation details are device-specific. Do not expect the
     same result when run on CPU and GPU in general. For the same
     reason do not expect the gradients to be deterministic.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dim (int) -- the dimension to reduce.


keepdim (bool) -- whether the output tensor has "dim"
        retained or not.
   Keyword Arguments:
      out ((Tensor, Tensor), optional) -- The first
      tensor will be populated with the median values and the second
      tensor, which must have dtype long, with their indices in the
      dimension "dim" of "input".
   Example:
      >>> a = torch.randn(4, 5)
      >>> a
      tensor([[ 0.2505, -0.3982, -0.9948,  0.3518, -1.3131],
              [ 0.3180, -0.6993,  1.0436,  0.0438,  0.2270],
              [-0.2751,  0.7303,  0.2192,  0.3321,  0.2488],
              [ 1.0778, -1.9510,  0.7048,  0.4742, -0.7125]])
      >>> torch.median(a, 1)
      torch.return_types.median(values=tensor([-0.3982,  0.2270,  0.2488,  0.4742]), indices=tensor([1, 4, 4, 3]))


ConstantPad1dclass torch.nn.ConstantPad1d(padding, value)
   Pads the input tensor boundaries with a constant value.
   For N-dimensional padding, use "torch.nn.functional.pad()".
   Parameters:
      padding (int, tuple) -- the size of the padding. If is
      int, uses the same padding in both boundaries. If a 2-tuple,
      uses (\text{padding_left}, \text{padding_right})
   Shape:
      * Input: (C, W_{in}) or (N, C, W_{in}).
      * Output: (C, W_{out}) or (N, C, W_{out}), where
        W_{out} = W_{in} + \text{padding_left} +
        \text{padding_right}
   Examples:
      >>> m = nn.ConstantPad1d(2, 3.5)
      >>> input = torch.randn(1, 2, 4)
      >>> input
      tensor([[[-1.0491, -0.7152, -0.0749,  0.8530],
               [-1.3287,  1.8966,  0.1466, -0.2771]]])
      >>> m(input)
      tensor([[[ 3.5000,  3.5000, -1.0491, -0.7152, -0.0749,  0.8530,  3.5000,
                 3.5000],
               [ 3.5000,  3.5000, -1.3287,  1.8966,  0.1466, -0.2771,  3.5000,


3.5000]]])
      >>> m = nn.ConstantPad1d(2, 3.5)
      >>> input = torch.randn(1, 2, 3)
      >>> input
      tensor([[[ 1.6616,  1.4523, -1.1255],
               [-3.6372,  0.1182, -1.8652]]])
      >>> m(input)
      tensor([[[ 3.5000,  3.5000,  1.6616,  1.4523, -1.1255,  3.5000,  3.5000],
               [ 3.5000,  3.5000, -3.6372,  0.1182, -1.8652,  3.5000,  3.5000]]])
      >>> # using different paddings for different sides
      >>> m = nn.ConstantPad1d((3, 1), 3.5)
      >>> m(input)
      tensor([[[ 3.5000,  3.5000,  3.5000,  1.6616,  1.4523, -1.1255,  3.5000],
               [ 3.5000,  3.5000,  3.5000, -3.6372,  0.1182, -1.8652,  3.5000]]])


ZeroPad2dclass torch.nn.ZeroPad2d(padding)
   Pads the input tensor boundaries with zero.
   For N-dimensional padding, use "torch.nn.functional.pad()".
   Parameters:
      padding (int, tuple) -- the size of the padding. If is
      int, uses the same padding in all boundaries. If a 4-tuple,
      uses (\text{padding_left}, \text{padding_right},
      \text{padding_top}, \text{padding_bottom})
   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} = H_{in} + \text{padding_top} +
        \text{padding_bottom}
        W_{out} = W_{in} + \text{padding_left} +
        \text{padding_right}
   Examples:
      >>> m = nn.ZeroPad2d(2)
      >>> input = torch.randn(1, 1, 3, 3)
      >>> input
      tensor([[[[-0.1678, -0.4418,  1.9466],
                [ 0.9604, -0.4219, -0.5241],
                [-0.9162, -0.5436, -0.6446]]]])
      >>> m(input)


m(input)
      tensor([[[[ 0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000],
                [ 0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000],
                [ 0.0000,  0.0000, -0.1678, -0.4418,  1.9466,  0.0000,  0.0000],
                [ 0.0000,  0.0000,  0.9604, -0.4219, -0.5241,  0.0000,  0.0000],
                [ 0.0000,  0.0000, -0.9162, -0.5436, -0.6446,  0.0000,  0.0000],
                [ 0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000],
                [ 0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000]]]])
      >>> # using different paddings for different sides
      >>> m = nn.ZeroPad2d((1, 1, 2, 0))
      >>> m(input)
      tensor([[[[ 0.0000,  0.0000,  0.0000,  0.0000,  0.0000],
                [ 0.0000,  0.0000,  0.0000,  0.0000,  0.0000],
                [ 0.0000, -0.1678, -0.4418,  1.9466,  0.0000],
                [ 0.0000,  0.9604, -0.4219, -0.5241,  0.0000],
                [ 0.0000, -0.9162, -0.5436, -0.6446,  0.0000]]]])


torch.Tensor.copysignTensor.copysign(other) -> Tensor
   See "torch.copysign()"


torch.true_dividetorch.true_divide(dividend, divisor, *, out) -> Tensor
   Alias for "torch.div()" with "rounding_mode=None".


torch.Tensor.scatter_reduceTensor.scatter_reduce(dim, index, src, reduce, *, include_self=True) -> Tensor
   Out-of-place version of "torch.Tensor.scatter_reduce_()"


torch.linalg.ldl_solvetorch.linalg.ldl_solve(LD, pivots, B, , hermitian=False, out=None) -> Tensor
   Computes the solution of a system of linear equations using the LDL
   factorization.
   "LD" and "pivots" are the compact representation of the LDL
   factorization and are expected to be computed by
   "torch.linalg.ldl_factor_ex()". "hermitian" argument to this
   function should be the same as the corresponding arguments in
   "torch.linalg.ldl_factor_ex()".
   Supports input of 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.
   Warning:
     This function is "experimental" and it may change in a future
     PyTorch release.
   Parameters:
      * LD (Tensor) -- the n times n matrix or the batch of
        such matrices of size (, n, n) where *** is one or more
        batch dimensions.
      * pivots (Tensor) -- the pivots corresponding to the LDL


factorization of "LD".
      * B (Tensor) -- right-hand side tensor of shape (, n,
        k).
   Keyword Arguments:
      * hermitian (bool, optional) -- whether to consider
        the decomposed matrix to be Hermitian or symmetric. For real-
        valued matrices, this switch has no effect. Default: False.
      * out (tuple, optional) -- output tensor. B may be
        passed as out and the result is computed in-place on B.
        Ignored if None. Default: None*.
   Examples:
      >>> A = torch.randn(2, 3, 3)
      >>> A = A @ A.mT # make symmetric
      >>> LD, pivots, info = torch.linalg.ldl_factor_ex(A)
      >>> B = torch.randn(2, 3, 4)
      >>> X = torch.linalg.ldl_solve(LD, pivots, B)
      >>> torch.linalg.norm(A @ X - B)
      >>> tensor(0.0001)


torch.tantorch.tan(input, , out=None) -> Tensor
   Returns a new tensor with the tangent of the elements of "input".
      \text{out}{i} = \tan(\text{input})
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(4)
      >>> a
      tensor([-1.2027, -1.7687,  0.4412, -1.3856])
      >>> torch.tan(a)
      tensor([-2.5930,  4.9859,  0.4722, -5.3366])


torch.Tensor.greater_equal_Tensor.greater_equal_(other) -> Tensor
   In-place version of "greater_equal()".


default_fused_per_channel_wt_fake_quanttorch.quantization.fake_quantize.default_fused_per_channel_wt_fake_quant
   alias of functools.partial(, observer=,
   quant_min=-128, quant_max=127, dtype=torch.qint8,
   qscheme=torch.per_channel_symmetric){}


torch.optim.Optimizer.state_dictOptimizer.state_dict()
   Returns the state of the optimizer as a "dict".
   It contains two entries:
   * state - a dict holding current optimization state. Its content
        differs between optimizer classes.
   * param_groups - a list containing all parameter groups where each
        parameter group is a dict


leaky_reluclass torch.ao.nn.quantized.functional.leaky_relu(input, negative_slope=0.01, inplace=False, scale=None, zero_point=None)
   Quantized version of the. leaky_relu(input, negative_slope=0.01,
   inplace=False, scale, zero_point) -> Tensor
   Applies element-wise, \text{LeakyReLU}(x) = \max(0, x) +
   \text{negative_slope} * \min(0, x)
   Parameters:
      * input (Tensor) -- Quantized input
      * negative_slope (float) -- The slope of the negative
        input
      * inplace (bool) -- Inplace modification of the input
        tensor
      * scale (Optional[float]) -- Scale and zero point of
        the output tensor.
      * zero_point (Optional[int]) -- Scale and zero point
        of the output tensor.
   See "LeakyReLU" for more details.


torch.func.jacfwdtorch.func.jacfwd(func, argnums=0, has_aux=False, , randomness='error')
   Computes the Jacobian of "func" with respect to the arg(s) at index
   "argnum" using forward-mode autodiff
   Parameters:
      * func (function) -- A Python function that takes one or
        more arguments, one of which must be a Tensor, and returns one
        or more Tensors
      * argnums (int or Tuple[int]*) -- Optional,
        integer or tuple of integers, saying which arguments to get
        the Jacobian with respect to. Default: 0.
      * has_aux (bool) -- Flag indicating that "func" returns a
        "(output, aux)" tuple where the first element is the output of
        the function to be differentiated and the second element is
        auxiliary objects that will not be differentiated. Default:
        False.
      * randomness (str) -- Flag indicating what type of
        randomness to use. See "vmap()" for more detail. Allowed:


"different", "same", "error". Default: "error"
   Returns:
      Returns a function that takes in the same inputs as "func" and
      returns the Jacobian of "func" with respect to the arg(s) at
      "argnums". If "has_aux is True", then the returned function
      instead returns a "(jacobian, aux)" tuple where "jacobian" is
      the Jacobian and "aux" is auxiliary objects returned by "func".
   Note:
     You may see this API error out with "forward-mode AD not
     implemented for operator X". If so, please file a bug report and
     we will prioritize it. An alternative is to use "jacrev()", which
     has better operator coverage.
   A basic usage with a pointwise, unary operation will give a
   diagonal array as the Jacobian

from torch.func import jacfwd
x = torch.randn(5)
jacobian = jacfwd(torch.sin)(x)
expected = torch.diag(torch.cos(x))
assert torch.allclose(jacobian, expected)
   "jacfwd()" can be composed with vmap to produce batched Jacobians:


from torch.func import jacfwd, vmap
x = torch.randn(64, 5)
jacobian = vmap(jacfwd(torch.sin))(x)
assert jacobian.shape == (64, 5, 5)
   If you would like to compute the output of the function as well as
   the jacobian of the function, use the "has_aux" flag to return the
   output as an auxiliary object:
from torch.func import jacfwd
x = torch.randn(5)
def f(x):
  return x.sin()
def g(x):
  result = f(x)
  return result, result
jacobian_f, f_x = jacfwd(g, has_aux=True)(x)
assert torch.allclose(f_x, f(x))
   Additionally, "jacrev()" can be composed with itself or "jacrev()"
   to produce Hessians
from torch.func import jacfwd, jacrev
def f(x):
  return x.sin().sum()
x = torch.randn(5)
hessian = jacfwd(jacrev(f))(x)
assert torch.allclose(hessian, torch.diag(-x.sin()))
   By default, "jacfwd()" computes the Jacobian with respect to the


first input. However, it can compute the Jacboian with respect to a
   different argument by using "argnums":

from torch.func import jacfwd
def f(x, y):
  return x + y ** 2
x, y = torch.randn(5), torch.randn(5)
jacobian = jacfwd(f, argnums=1)(x, y)
expected = torch.diag(2 * y)
assert torch.allclose(jacobian, expected)
   Additionally, passing a tuple to "argnums" will compute the
   Jacobian with respect to multiple arguments
from torch.func import jacfwd
def f(x, y):
  return x + y ** 2
x, y = torch.randn(5), torch.randn(5)
jacobian = jacfwd(f, argnums=(0, 1))(x, y)
expectedX = torch.diag(torch.ones_like(x))
expectedY = torch.diag(2 * y)
assert torch.allclose(jacobian[0], expectedX)
assert torch.allclose(jacobian[1], expectedY)


torch._foreach_exptorch._foreach_exp(self: List[Tensor]) -> List[Tensor]
   Apply "torch.exp()" to each Tensor of the input list.