unstable as it depends on the computation of L^{-1} and U^{-1}.
   Parameters:
      * A (Tensor) -- the tensor to factor of size (, m, n)
      * pivot (bool, optional) -- controls whether pivoting
        is done. Default: "True"
      * get_infos (bool, optional) -- if set to "True",
        returns an info IntTensor. Default: "False"
      * out (tuple, optional) -- optional output tuple. If
        "get_infos" is "True", then the elements in the tuple are
        Tensor, IntTensor, and IntTensor. If "get_infos" is "False",
        then the elements in the tuple are Tensor, IntTensor. Default:
        "None"
   Returns:
      A tuple of tensors containing
         * factorization (Tensor): the factorization of size (,
           m, n)
         * pivots (IntTensor): the pivots of size (*,
           \text{min}(m, n)). "pivots" stores all the intermediate
           transpositions of rows. The final permutation "perm" could


be reconstructed by applying "swap(perm[i], perm[pivots[i]
           - 1])" for "i = 0, ..., pivots.size(-1) - 1", where "perm"
           is initially the identity permutation of m elements
           (essentially this is what "torch.lu_unpack()" is doing).
         * infos (IntTensor, optional): if "get_infos" is
           "True", this is a tensor of size (*) where non-zero values
           indicate whether factorization for the matrix or each
           minibatch has succeeded or failed
   Return type:
      (Tensor, IntTensor, IntTensor (optional))
   Example:
      >>> A = torch.randn(2, 3, 3)
      >>> A_LU, pivots = torch.lu(A)
      >>> A_LU
      tensor([[[ 1.3506,  2.5558, -0.0816],
               [ 0.1684,  1.1551,  0.1940],
               [ 0.1193,  0.6189, -0.5497]],
              [[ 0.4526,  1.2526, -0.3285],
               [-0.7988,  0.7175, -0.9701],
               [ 0.2634, -0.9255, -0.3459]]])
      >>> pivots
      tensor([[ 3,  3,  3],


pivots
      tensor([[ 3,  3,  3],
              [ 3,  3,  3]], dtype=torch.int32)
      >>> A_LU, pivots, info = torch.lu(A, get_infos=True)
      >>> if info.nonzero().size(0) == 0:
      ...     print('LU factorization succeeded for all samples!')
      LU factorization succeeded for all samples!


torch.Tensor.addbmm_Tensor.addbmm_(batch1, batch2, *, beta=1, alpha=1) -> Tensor
   In-place version of "addbmm()"


torch.absolutetorch.absolute(input, *, out=None) -> Tensor
   Alias for "torch.abs()"


torch.Tensor.requires_gradTensor.requires_grad
   Is "True" if gradients need to be computed for this Tensor, "False"
   otherwise.
   Note:
     The fact that gradients need to be computed for a Tensor do not
     mean that the "grad" attribute will be populated, see "is_leaf"
     for more details.


torch.trunctorch.trunc(input, , out=None) -> Tensor
   Returns a new tensor with the truncated integer values of the
   elements of "input".
   For integer inputs, follows the array-api convention of returning a
   copy of the input tensor.
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(4)
      >>> a
      tensor([ 3.4742,  0.5466, -0.8008, -0.9079])
      >>> torch.trunc(a)
      tensor([ 3.,  0., -0., -0.])


torch.linalg.choleskytorch.linalg.cholesky(A, , upper=False, out=None) -> Tensor
   Computes the Cholesky decomposition of a complex Hermitian or real
   symmetric positive-definite matrix.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, the Cholesky
   decomposition* of a complex Hermitian or real symmetric positive-
   definite matrix A \in \mathbb{K}^{n \times n} is defined as
      A = LL^{\text{H}}\mathrlap{\qquad L \in \mathbb{K}^{n \times n}}
   where L is a lower triangular matrix with real positive diagonal
   (even in the complex case) and L^{\text{H}} is the conjugate
   transpose when L is complex, and the transpose when L is real-
   valued.
   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.
   Note:
     When inputs are on a CUDA device, this function synchronizes that
     device with the CPU.
   See also:


device with the CPU.
   See also:
     "torch.linalg.cholesky_ex()" for a version of this operation that
     skips the (slow) error checking by default and instead returns
     the debug information. This makes it a faster way to check if a
     matrix is positive-definite.
     "torch.linalg.eigh()" for a different decomposition of a
     Hermitian matrix. The eigenvalue decomposition gives more
     information about the matrix but it slower to compute than the
     Cholesky decomposition.
   Parameters:
      A (Tensor) -- tensor of shape (, n, n) where *** is
      zero or more batch dimensions consisting of symmetric or
      Hermitian positive-definite matrices.
   Keyword Arguments:
      * upper (bool, optional) -- whether to return an upper
        triangular matrix. The tensor returned with upper=True is the
        conjugate transpose of the tensor returned with upper=False.
      * out (Tensor, optional*) -- output tensor. Ignored if


None. Default: None.
   Raises:
      RuntimeError -- if the "A" matrix or any matrix in a batched
      "A" is not Hermitian     (resp. symmetric) positive-definite. If
      "A" is a batch of matrices,     the error message will include
      the batch index of the first matrix that fails     to meet this
      condition.
   Examples:
      >>> A = torch.randn(2, 2, dtype=torch.complex128)
      >>> A = A @ A.T.conj() + torch.eye(2) # creates a Hermitian positive-definite matrix
      >>> A
      tensor([[2.5266+0.0000j, 1.9586-2.0626j],
              [1.9586+2.0626j, 9.4160+0.0000j]], dtype=torch.complex128)
      >>> L = torch.linalg.cholesky(A)
      >>> L
      tensor([[1.5895+0.0000j, 0.0000+0.0000j],
              [1.2322+1.2976j, 2.4928+0.0000j]], dtype=torch.complex128)
      >>> torch.dist(L @ L.T.conj(), A)
      tensor(4.4692e-16, dtype=torch.float64)
      >>> A = torch.randn(3, 2, 2, dtype=torch.float64)


A = A @ A.mT + torch.eye(2)  # batch of symmetric positive-definite matrices
      >>> L = torch.linalg.cholesky(A)
      >>> torch.dist(L @ L.mT, A)
      tensor(5.8747e-16, dtype=torch.float64)


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


\text{in_channels} , iT , iH , iW)
      * weight -- filters of shape (\text{in_channels} ,
        \frac{\text{out_channels}}{\text{groups}} , kT , 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 "(sT, 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 "(padT, 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_padT, 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 (dT, dH, dW). Default: 1
   Examples:
      >>> inputs = torch.randn(20, 16, 50, 10, 20)
      >>> weights = torch.randn(16, 33, 3, 3, 3)
      >>> F.conv_transpose3d(inputs, weights)


torch.cuda.memory_usagetorch.cuda.memory_usage(device=None)
   Returns the percent of time over the past sample period during
   which global (device) memory was being read or written. as given by
   nvidia-smi.
   Parameters:
      device (torch.device or int, optional) -- selected
      device. Returns statistic for the current device, given by
      "current_device()", if "device" is "None" (default).
   Return type:
      int
   Warning: Each sample period may be between 1 second and 1/6 second,
   depending on the product being queried.


ConvTranspose1dclass torch.ao.nn.quantized.ConvTranspose1d(in_channels, out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode='zeros', device=None, dtype=None)
   Applies a 1D transposed convolution operator over an input image
   composed of several input planes. For details on input arguments,
   parameters, and implementation see "ConvTranspose1d".
   Note:
     Currently only the QNNPACK engine is implemented. Please, set the
     torch.backends.quantized.engine = 'qnnpack'
   For special notes, please, see "Conv1d"
   Variables:
      * weight (Tensor) -- packed tensor derived from the
        learnable weight parameter.
      * scale (Tensor) -- scalar for the output scale
      * zero_point (Tensor) -- scalar for the output zero point
   See "ConvTranspose2d" for other attributes.
   Examples:
      >>> torch.backends.quantized.engine = 'qnnpack'
      >>> from torch.nn import quantized as nnq


from torch.nn import quantized as nnq
      >>> # With square kernels and equal stride
      >>> m = nnq.ConvTranspose1d(16, 33, 3, stride=2)
      >>> # non-square kernels and unequal stride and with padding
      >>> m = nnq.ConvTranspose1d(16, 33, (3, 5), stride=(2, 1), padding=(4, 2))
      >>> input = torch.randn(20, 16, 50)
      >>> q_input = torch.quantize_per_tensor(input, scale=1.0, zero_point=0, dtype=torch.quint8)
      >>> output = m(q_input)
      >>> # exact output size can be also specified as an argument
      >>> input = torch.randn(1, 16, 12)
      >>> q_input = torch.quantize_per_tensor(input, scale=1.0, zero_point=0, dtype=torch.quint8)
      >>> downsample = nnq.Conv1d(16, 16, 3, stride=2, padding=1)
      >>> upsample = nnq.ConvTranspose1d(16, 16, 3, stride=2, padding=1)
      >>> h = downsample(q_input)
      >>> h.size()
      torch.Size([1, 16, 6])
      >>> output = upsample(h, output_size=input.size())
      >>> output.size()
      torch.Size([1, 16, 12])


torch.linalg.solve_triangulartorch.linalg.solve_triangular(A, B, , upper, left=True, unitriangular=False, out=None) -> Tensor
   Computes the solution of a triangular system of linear equations
   with a unique solution.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, this function
   computes the solution X \in \mathbb{K}^{n \times k} of the linear
   system associated to the triangular matrix A \in \mathbb{K}^{n
   \times n} without zeros on the diagonal (that is, it is invertible)
   and the rectangular matrix , B \in \mathbb{K}^{n \times k}, which
   is defined as
      AX = B
   The argument "upper" signals whether A is upper or lower
   triangular.
   If "left"= False, this function returns the matrix X \in
   \mathbb{K}^{n \times k} that solves the system
      XA = B\mathrlap{\qquad A \in \mathbb{K}^{k \times k}, B \in
      \mathbb{K}^{n \times k}.}
   If "upper"= True (resp. False*) just the upper (resp. lower)


triangular half of "A" will be accessed. The elements below the
   main diagonal will be considered to be zero and will not be
   accessed.
   If "unitriangular"= True, the diagonal of "A" is assumed to be
   ones and will not be accessed.
   The result may contain NaN s if the diagonal of "A" contains
   zeros or elements that are very close to zero and "unitriangular"=
   False (default) or if the input matrix has very small eigenvalues.
   Supports inputs of float, double, cfloat and cdouble dtypes. Also
   supports batches of matrices, and if the inputs are batches of
   matrices then the output has the same batch dimensions.
   See also:
     "torch.linalg.solve()" computes the solution of a general square
     system of linear equations with a unique solution.
   Parameters:
      * A (Tensor) -- tensor of shape (, n, n) (or (, k,
        k) if "left"= True) where *** is zero or more batch
        dimensions.
      * B (Tensor) -- right-hand side tensor of shape (, n,


k).
   Keyword Arguments:
      * upper (bool) -- whether "A" is an upper or lower
        triangular matrix.
      * left (bool, optional) -- whether to solve the system
        AX=B or XA = B. Default: True.
      * unitriangular (bool, optional) -- if True, the
        diagonal elements of "A" are assumed to be all equal to 1.
        Default: False.
      * out (Tensor, 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(3, 3).triu_()
      >>> b = torch.randn(3, 4)
      >>> X = torch.linalg.solve_triangular(A, B, upper=True)
      >>> torch.allclose(A @ X, B)
      True
      >>> A = torch.randn(2, 3, 3).tril_()
      >>> B = torch.randn(2, 3, 4)
      >>> X = torch.linalg.solve_triangular(A, B, upper=False)
      >>> torch.allclose(A @ X, B)
      True
      >>> A = torch.randn(2, 4, 4).tril_()


A = torch.randn(2, 4, 4).tril_()
      >>> B = torch.randn(2, 3, 4)
      >>> X = torch.linalg.solve_triangular(A, B, upper=False, left=False)
      >>> torch.allclose(X @ A, B)
      True


torch.covtorch.cov(input, *, correction=1, fweights=None, aweights=None) -> Tensor
   Estimates the covariance matrix of the variables given by the
   "input" matrix, where rows are the variables and columns are the
   observations.
   A covariance matrix is a square matrix giving the covariance of
   each pair of variables. The diagonal contains the variance of each
   variable (covariance of a variable with itself). By definition, if
   "input" represents a single variable (Scalar or 1D) then its
   variance is returned.
   The unbiased sample covariance of the variables x and y is given
   by:
      \text{cov}w(x,y) = \frac{\sum^{N}(x_{i} -
      \bar{x})(y_{i} - \bar{y})}{N~-~1}
   where \bar{x} and \bar{y} are the simple means of the x and y
   respectively.
   If "fweights" and/or "aweights" are provided, the unbiased weighted
   covariance is calculated, which is given by:
      \text{cov}w(x,y) = \frac{\sum^{N}w_i(x_{i} -


\mu_x^)(y_{i} - \mu_y^)}{\sum^{N}_{i = 1}w_i~-~1}
   where w denotes "fweights" or "aweights" based on whichever is
   provided, or w = fweights \times aweights if both are provided, and
   \mu_x^ = \frac{\sum^{N}{i = 1}w_ix }{\sum^{N}_{i = 1}w_i} is
   the weighted mean of the variable.
   Parameters:
      input (Tensor) -- A 2D matrix containing multiple
      variables and observations, or a Scalar or 1D vector
      representing a single variable.
   Keyword Arguments:
      * correction (int, optional) -- difference between the
        sample size and sample degrees of freedom. Defaults to
        Bessel's correction, "correction = 1" which returns the
        unbiased estimate, even if both "fweights" and "aweights" are
        specified. "correction = 0" will return the simple average.
        Defaults to "1".
      * fweights (tensor, optional*) -- A Scalar or 1D tensor
        of observation vector frequencies representing the number of


times each observation should be repeated. Its numel must
        equal the number of columns of "input". Must have integral
        dtype. Ignored if "None". Defaults to None`*.
      * **aweights** (*tensor**, **optional*) -- A Scalar or 1D array
        of observation vector weights. These relative weights are
        typically large for observations considered âimportantâ and
        smaller for observations considered less âimportantâ. Its
        numel must equal the number of columns of "input". Must have
        floating point dtype. Ignored if "None". *Defaults toNone`.
   Returns:
      (Tensor) The covariance matrix of the variables.
   See also: "torch.corrcoef()" normalized covariance matrix.
   Example::
      >>> x = torch.tensor([[0, 2], [1, 1], [2, 0]]).T
      >>> x
      tensor([[0, 1, 2],
              [2, 1, 0]])
      >>> torch.cov(x)
      tensor([[ 1., -1.],
              [-1.,  1.]])
      >>> torch.cov(x, correction=0)
      tensor([[ 0.6667, -0.6667],


tensor([[ 0.6667, -0.6667],
              [-0.6667,  0.6667]])
      >>> fw = torch.randint(1, 10, (3,))
      >>> fw
      tensor([1, 6, 9])
      >>> aw = torch.rand(3)
      >>> aw
      tensor([0.4282, 0.0255, 0.4144])
      >>> torch.cov(x, fweights=fw, aweights=aw)
      tensor([[ 0.4169, -0.4169],
              [-0.4169,  0.4169]])


torch.asarraytorch.asarray(obj, *, dtype=None, device=None, copy=None, requires_grad=False) -> Tensor
   Converts "obj" to a tensor.
   "obj" can be one of:
   1. a tensor
   2. a NumPy array
   3. a DLPack capsule
   4. an object that implements Python's buffer protocol
   5. a scalar
   6. a sequence of scalars
   When "obj" is a tensor, NumPy array, or DLPack capsule the returned
   tensor will, by default, not require a gradient, have the same
   datatype as "obj", be on the same device, and share memory with it.
   These properties can be controlled with the "dtype", "device",
   "copy", and "requires_grad" keyword arguments. If the returned
   tensor is of a different datatype, on a different device, or a copy
   is requested then it will not share its memory with "obj". If
   "requires_grad" is "True" then the returned tensor will require a
   gradient, and if "obj" is also a tensor with an autograd history
   then the returned tensor will have the same history.


When "obj" is not a tensor, NumPy Array, or DLPack capsule but
   implements Python's buffer protocol then the buffer is interpreted
   as an array of bytes grouped according to the size of the datatype
   passed to the "dtype" keyword argument. (If no datatype is passed
   then the default floating point datatype is used, instead.) The
   returned tensor will have the specified datatype (or default
   floating point datatype if none is specified) and, by default, be
   on the CPU device and share memory with the buffer.
   When "obj" is none of the above but a scalar or sequence of scalars
   then the returned tensor will, by default, infer its datatype from
   the scalar values, be on the CPU device, and not share its memory.
   See also:
     "torch.tensor()" creates a tensor that always copies the data
     from the input object. "torch.from_numpy()" creates a tensor that
     always shares memory from NumPy arrays. "torch.frombuffer()"
     creates a tensor that always shares memory from objects that


implement the buffer protocol. "torch.from_dlpack()" creates a
     tensor that always shares memory from DLPack capsules.
   Parameters:
      obj (object) -- a tensor, NumPy array, DLPack Capsule,
      object that implements Python's buffer protocol, scalar, or
      sequence of scalars.
   Keyword Arguments:
      * dtype ("torch.dtype", optional) -- the datatype of the
        returned tensor. Default: "None", which causes the datatype of
        the returned tensor to be inferred from "obj".
      * copy (bool, optional) -- controls whether the
        returned tensor shares memory with "obj". Default: "None",
        which causes the returned tensor to share memory with "obj"
        whenever possible. If "True" then the returned tensor does not
        share its memory. If "False" then the returned tensor shares
        its memory with "obj" and an error is thrown if it cannot.
      * device ("torch.device", optional) -- the device of the


returned tensor. Default: "None", which causes the device of
        "obj" to be used.
      * requires_grad (bool, optional) -- whether the
        returned tensor requires grad. Default: "False", which causes
        the returned tensor not to require a gradient. If "True", then
        the returned tensor will require a gradient, and if "obj" is
        also a tensor with an autograd history then the returned
        tensor will have the same history.
   Example:
      >>> a = torch.tensor([1, 2, 3])
      >>> # Shares memory with tensor 'a'
      >>> b = torch.asarray(a)
      >>> a.data_ptr() == b.data_ptr()
      True
      >>> # Forces memory copy
      >>> c = torch.asarray(a, copy=True)
      >>> a.data_ptr() == c.data_ptr()
      False
      >>> a = torch.tensor([1, 2, 3], requires_grad=True).float()
      >>> b = a + 2
      >>> b
      tensor([1., 2., 3.], grad_fn=)
      >>> # Shares memory with tensor 'b', with no grad
      >>> c = torch.asarray(b)
      >>> c


c = torch.asarray(b)
      >>> c
      tensor([1., 2., 3.])
      >>> # Shares memory with tensor 'b', retaining autograd history
      >>> d = torch.asarray(b, requires_grad=True)
      >>> d
      tensor([1., 2., 3.], grad_fn=)
      >>> array = numpy.array([1, 2, 3])
      >>> # Shares memory with array 'array'
      >>> t1 = torch.asarray(array)
      >>> array.array_interface['data'][0] == t1.data_ptr()
      True
      >>> # Copies memory due to dtype mismatch
      >>> t2 = torch.asarray(array, dtype=torch.float32)
      >>> array.array_interface['data'][0] == t1.data_ptr()
      False


torch.concattorch.concat(tensors, dim=0, *, out=None) -> Tensor
   Alias of "torch.cat()".


torch.argwheretorch.argwhere(input) -> Tensor
   Returns a tensor containing the indices of all non-zero elements of
   "input".  Each row in the result contains the indices of a non-zero
   element in "input". The result is sorted lexicographically, with
   the last index changing the fastest (C-style).
   If "input" has n dimensions, then the resulting indices tensor
   "out" is of size (z \times n), where z is the total number of non-
   zero elements in the "input" tensor.
   Note:
     This function is similar to NumPy's argwhere.When "input" is on
     CUDA, this function causes host-device synchronization.
   Parameters:
      {input} --
   Example:
      >>> t = torch.tensor([1, 0, 1])
      >>> torch.argwhere(t)
      tensor([[0],
              [2]])
      >>> t = torch.tensor([[1, 0, 1], [0, 1, 1]])
      >>> torch.argwhere(t)
      tensor([[0, 0],
              [0, 2],
              [1, 1],
              [1, 2]])


torch.Tensor.fill_Tensor.fill_(value) -> Tensor
   Fills "self" tensor with the specified value.


NoopObserverclass torch.quantization.observer.NoopObserver(dtype=torch.float16, custom_op_name='')
   Observer that doesn't do anything and just passes its configuration
   to the quantized module's ".from_float()".
   Primarily used for quantization to float16 which doesn't require
   determining ranges.
   Parameters:
      * dtype -- Quantized data type
      * custom_op_name -- (temporary) specify this observer for an
        operator that doesn't require any observation (Can be used in
        Graph Mode Passes for special case ops).


torch.nn.functional.hardtanhtorch.nn.functional.hardtanh(input, min_val=- 1., max_val=1., inplace=False) -> Tensor
   Applies the HardTanh function element-wise. See "Hardtanh" for more
   details.
   Return type:
      Tensor


torch.foreach_frac_torch._foreach_frac(self: List[Tensor]) -> None
   Apply "torch.frac()" to each Tensor of the input list.


torch.nn.functional.mishtorch.nn.functional.mish(input, 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
   See "Mish" for more details.
   Return type:
      Tensor


torch.Tensor.square_Tensor.square_() -> Tensor
   In-place version of "square()"


torch.Tensor.sgn_Tensor.sgn_() -> Tensor
   In-place version of "sgn()"


torch.fft.fftshifttorch.fft.fftshift(input, dim=None) -> Tensor
   Reorders n-dimensional FFT data, as provided by "fftn()", to have
   negative frequency terms first.
   This performs a periodic shift of n-dimensional data such that the
   origin "(0, ..., 0)" is moved to the center of the tensor.
   Specifically, to "input.shape[dim] // 2" in each selected
   dimension.
   Note:
     By convention, the FFT returns positive frequency terms first,
     followed by the negative frequencies in reverse order, so that
     "f[-i]" for all 0 < i \leq n/2 in Python gives the negative
     frequency terms. "fftshift()" rearranges all frequencies into
     ascending order from negative to positive with the zero-frequency
     term in the center.
   Note:
     For even lengths, the Nyquist frequency at "f[n/2]" can be
     thought of as either negative or positive. "fftshift()" always
     puts the Nyquist term at the 0-index. This is the same convention
     used by "fftfreq()".
   Parameters:


used by "fftfreq()".
   Parameters:
      * input (Tensor) -- the tensor in FFT order
      * dim (int, Tuple[int], optional) -- The
        dimensions to rearrange. Only dimensions specified here will
        be rearranged, any other dimensions will be left in their
        original order. Default: All dimensions of "input".
   -[ Example ]-

f = torch.fft.fftfreq(4)
f
   tensor([ 0.0000,  0.2500, -0.5000, -0.2500])
torch.fft.fftshift(f)
   tensor([-0.5000, -0.2500,  0.0000,  0.2500])
   Also notice that the Nyquist frequency term at "f[2]" was moved to
   the beginning of the tensor.
   This also works for multi-dimensional transforms:
x = torch.fft.fftfreq(5, d=1/5) + 0.1 * torch.fft.fftfreq(5, d=1/5).unsqueeze(1)
x
   tensor([[ 0.0000,  1.0000,  2.0000, -2.0000, -1.0000],
           [ 0.1000,  1.1000,  2.1000, -1.9000, -0.9000],
           [ 0.2000,  1.2000,  2.2000, -1.8000, -0.8000],


[-0.2000,  0.8000,  1.8000, -2.2000, -1.2000],
           [-0.1000,  0.9000,  1.9000, -2.1000, -1.1000]])

torch.fft.fftshift(x)
   tensor([[-2.2000, -1.2000, -0.2000,  0.8000,  1.8000],
           [-2.1000, -1.1000, -0.1000,  0.9000,  1.9000],
           [-2.0000, -1.0000,  0.0000,  1.0000,  2.0000],
           [-1.9000, -0.9000,  0.1000,  1.1000,  2.1000],
           [-1.8000, -0.8000,  0.2000,  1.2000,  2.2000]])
   "fftshift()" can also be useful for spatial data. If our data is
   defined on a centered grid ("[-(N//2), (N-1)//2]") then we can use
   the standard FFT defined on an uncentered grid ("[0, N)") by first
   applying an "ifftshift()".
x_centered = torch.arange(-5, 5)
x_uncentered = torch.fft.ifftshift(x_centered)
fft_uncentered = torch.fft.fft(x_uncentered)
   Similarly, we can convert the frequency domain components to
   centered convention by applying "fftshift()".
fft_centered = torch.fft.fftshift(fft_uncentered)


The inverse transform, from centered Fourier space back to centered
   spatial data, can be performed by applying the inverse shifts in
   reverse order:

x_centered_2 = torch.fft.fftshift(torch.fft.ifft(torch.fft.ifftshift(fft_centered)))
torch.testing.assert_close(x_centered.to(torch.complex64), x_centered_2, check_stride=False)


float_qparams_weight_only_qconfigtorch.quantization.qconfig.float_qparams_weight_only_qconfig
   alias of QConfig(activation=,
   weight=functools.partial(,
   dtype=torch.quint8, qscheme=torch.per_channel_affine_float_qparams,
   ch_axis=0){})


torch.nn.functional.gumbel_softmaxtorch.nn.functional.gumbel_softmax(logits, tau=1, hard=False, eps=1e-10, dim=- 1)
   Samples from the Gumbel-Softmax distribution (Link 1  Link 2) and
   optionally discretizes.
   Parameters:
      * logits (Tensor) -- [..., num_features] unnormalized
        log probabilities
      * tau (float) -- non-negative scalar temperature
      * hard (bool) -- if "True", the returned samples will be
        discretized as one-hot vectors, but will be differentiated as
        if it is the soft sample in autograd
      * dim (int) -- A dimension along which softmax will be
        computed. Default: -1.
   Returns:
      Sampled tensor of same shape as logits from the Gumbel-Softmax
      distribution. If "hard=True", the returned samples will be one-
      hot, otherwise they will be probability distributions that sum
      to 1 across dim.
   Return type:
      Tensor
   Note:


Return type:
      Tensor
   Note:
     This function is here for legacy reasons, may be removed from
     nn.Functional in the future.
   Note:
     The main trick for hard is to do  y_hard - y_soft.detach() +
     y_softIt achieves two things: - makes the output value exactly
     one-hot (since we add then subtract y_soft value) - makes the
     gradient equal to y_soft gradient (since we strip all other
     gradients)
   Examples::
      >>> logits = torch.randn(20, 32)
      >>> # Sample soft categorical using reparametrization trick:
      >>> F.gumbel_softmax(logits, tau=1, hard=False)
      >>> # Sample hard categorical using "Straight-through" trick:
      >>> F.gumbel_softmax(logits, tau=1, hard=True)


torch._foreach_log10torch._foreach_log10(self: List[Tensor]) -> List[Tensor]
   Apply "torch.log10()" to each Tensor of the input list.


torch.nn.utils.parametrize.register_parametrizationtorch.nn.utils.parametrize.register_parametrization(module, tensor_name, parametrization, *, unsafe=False)
   Adds a parametrization to a tensor in a module.
   Assume that "tensor_name="weight"" for simplicity. When accessing
   "module.weight", the module will return the parametrized version
   "parametrization(module.weight)". If the original tensor requires a
   gradient, the backward pass will differentiate through
   "parametrization", and the optimizer will update the tensor
   accordingly.
   The first time that a module registers a parametrization, this
   function will add an attribute "parametrizations" to the module of
   type "ParametrizationList".
   The list of parametrizations on the tensor "weight" will be
   accessible under "module.parametrizations.weight".
   The original tensor will be accessible under
   "module.parametrizations.weight.original".


"module.parametrizations.weight.original".
   Parametrizations may be concatenated by registering several
   parametrizations on the same attribute.
   The training mode of a registered parametrization is updated on
   registration to match the training mode of the host module
   Parametrized parameters and buffers have an inbuilt caching system
   that can be activated using the context manager "cached()".
   A "parametrization" may optionally implement a method with
   signature
      def right_inverse(self, X: Tensor) -> Union[Tensor, Sequence[Tensor]]
   This method is called on the unparametrized tensor when the first
   parametrization is registered to compute the initial value of the
   original tensor. If this method is not implemented, the original
   tensor will be just the unparametrized tensor.
   If all the parametrizations registered on a tensor implement
   right_inverse it is possible to initialize a parametrized tensor
   by assigning to it, as shown in the example below.


It is possible for the first parametrization to depend on several
   inputs. This may be implemented returning a tuple of tensors from
   "right_inverse" (see the example implementation of a "RankOne"
   parametrization below).
   In this case, the unconstrained tensors are also located under
   "module.parametrizations.weight" with names "original0",
   "original1",...
   Note:
     If unsafe=False (default) both the forward and right_inverse
     methods will be called once to perform a number of consistency
     checks. If unsafe=True, then right_inverse will be called if the
     tensor is not parametrized, and nothing will be called otherwise.
   Note:
     In most situations, "right_inverse" will be a function such that
     "forward(right_inverse(X)) == X" (see right inverse). Sometimes,
     when the parametrization is not surjective, it may be reasonable
     to relax this.
   Warning:
     If a parametrization depends on several inputs,


"register_parametrization()" will register a number of new
     parameters. If such parametrization is registered after the
     optimizer is created, these new parameters will need to be added
     manually to the optimizer. See
     "torch.Optimizer.add_param_group()".
   Parameters:
      * module (nn.Module) -- module on which to register the
        parametrization
      * tensor_name (str) -- name of the parameter or buffer on
        which to register the parametrization
      * parametrization (nn.Module) -- the parametrization to
        register
   Keyword Arguments:
      unsafe (bool) -- a boolean flag that denotes whether the
      parametrization may change the dtype and shape of the tensor.
      Default: False Warning: the parametrization is not checked for
      consistency upon registration. Enable this flag at your own
      risk.
   Raises:
      ValueError -- if the module does not have a parameter or a
      buffer named "tensor_name"
   Return type:


buffer named "tensor_name"
   Return type:
      Module
   -[ Examples ]-

import torch
import torch.nn as nn
import torch.nn.utils.parametrize as P
class Symmetric(nn.Module):
    def forward(self, X):
        return X.triu() + X.triu(1).T  # Return a symmetric matrix
def right_inverse(self, A):
    return A.triu()

m = nn.Linear(5, 5)
P.register_parametrization(m, "weight", Symmetric())
print(torch.allclose(m.weight, m.weight.T))  # m.weight is now symmetric
   True
A = torch.rand(5, 5)
A = A + A.T   # A is now symmetric
m.weight = A  # Initialize the weight to be the symmetric matrix A
print(torch.allclose(m.weight, A))
   True
class RankOne(nn.Module):
    def forward(self, x, y):
        # Form a rank 1 matrix multiplying two vectors
        return x.unsqueeze(-1) @ y.unsqueeze(-2)
def right_inverse(self, Z):


def right_inverse(self, Z):
    # Project Z onto the rank 1 matrices
    U, S, Vh = torch.linalg.svd(Z, full_matrices=False)
    # Return rescaled singular vectors
    s0_sqrt = S[0].sqrt().unsqueeze(-1)
    return U[..., :, 0] * s0_sqrt, Vh[..., 0, :] * s0_sqrt

linear_rank_one = P.register_parametrization(nn.Linear(4, 4), "weight", RankOne())
print(torch.linalg.matrix_rank(linear_rank_one.weight).item())
   1


default_qat_qconfig_v2torch.quantization.qconfig.default_qat_qconfig_v2
   alias of QConfig(activation=functools.partial(,
   observer=,
   quant_min=0, quant_max=255, dtype=torch.quint8){},
   weight=functools.partial(, observer=,
   quant_min=-128, quant_max=127, dtype=torch.qint8,
   qscheme=torch.per_tensor_symmetric){})


torch.Tensor.truncTensor.trunc() -> Tensor
   See "torch.trunc()"


torch.fft.rfft2torch.fft.rfft2(input, s=None, dim=(- 2, - 1), norm=None, , out=None) -> Tensor
   Computes the 2-dimensional discrete Fourier transform of real
   "input". Equivalent to "rfftn()" but FFTs only the last two
   dimensions by default.
   The FFT of a real signal is Hermitian-symmetric, "X[i, j] =
   conj(X[-i, -j])", so the full "fft2()" output contains redundant
   information. "rfft2()" instead omits the negative frequencies in
   the last dimension.
   Note:
     Supports torch.half on CUDA with GPU Architecture SM53 or
     greater. However it only supports powers of 2 signal length in
     every transformed dimensions.
   Parameters:
      * input (Tensor) -- the input tensor
      * s (Tuple[int], *optional) -- Signal size in the
        transformed dimensions. If given, each dimension "dim[i]" will
        either be zero-padded or trimmed to the length "s[i]" before
        computing the real FFT. If a length "-1" is specified, no


padding is done in that dimension. Default: "s =
        [input.size(d) for d in dim]"
      * dim (Tuple[int], optional) -- Dimensions to be
        transformed. Default: last two dimensions.
      * norm (str, optional) --
        Normalization mode. For the forward transform ("rfft2()"),
        these correspond to:
        * ""forward"" - normalize by "1/n"
        * ""backward"" - no normalization
        * ""ortho"" - normalize by "1/sqrt(n)" (making the real FFT
          orthonormal)
        Where "n = prod(s)" is the logical FFT size. Calling the
        backward transform ("irfft2()") with the same normalization
        mode will apply an overall normalization of "1/n" between the
        two transforms. This is required to make "irfft2()" the exact
        inverse.
        Default is ""backward"" (no normalization).
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   -[ Example ]-

t = torch.rand(10, 10)


-[ Example ]-

t = torch.rand(10, 10)
rfft2 = torch.fft.rfft2(t)
rfft2.size()
   torch.Size([10, 6])
   Compared against the full output from "fft2()", we have all
   elements up to the Nyquist frequency.
fft2 = torch.fft.fft2(t)
torch.testing.assert_close(fft2[..., :6], rfft2, check_stride=False)
   The discrete Fourier transform is separable, so "rfft2()" here is
   equivalent to a combination of "fft()" and "rfft()":
two_ffts = torch.fft.fft(torch.fft.rfft(t, dim=1), dim=0)
torch.testing.assert_close(rfft2, two_ffts, check_stride=False)


GRUclass torch.ao.nn.quantized.dynamic.GRU(args, kwargs)
   Applies a multi-layer gated recurrent unit (GRU) RNN to an input
   sequence.
   For each element in the input sequence, each layer computes the
   following function:
      \begin{array}{ll}     r_t = \sigma(W_{ir} x_t + b_{ir} + W_{hr}
      h_{(t-1)} + b_{hr}) \     z_t = \sigma(W_{iz} x_t + b_{iz} +
      W_{hz} h_{(t-1)} + b_{hz}) \     n_t = \tanh(W_{in} x_t +
      b_{in} + r_t * (W_{hn} h_{(t-1)}+ b_{hn})) \     h_t = (1 -
      z_t) * n_t + z_t * h_{(t-1)} \end{array}
   where h_t is the hidden state at time t, x_t is the input at time
   t, h_{(t-1)} is the hidden state of the layer at time t-1 or
   the initial hidden state at time 0*, and r_t, z_t, n_t are the
   reset, update, and new gates, respectively. \sigma is the sigmoid
   function, and * is the Hadamard product.
   In a multilayer GRU, the input x^{(l)}_t of the l -th layer (l >=
   2) is the hidden state h^{(l-1)}_t of the previous layer multiplied


by dropout \delta^{(l-1)}_t where each \delta^{(l-1)}_t is a
   Bernoulli random variable which is 0 with probability "dropout".
   Parameters:
      * input_size -- The number of expected features in the input
        x
      * hidden_size -- The number of features in the hidden state
        h
      * num_layers -- Number of recurrent layers. E.g., setting
        "num_layers=2" would mean stacking two GRUs together to form a
        stacked GRU, with the second GRU taking in outputs of the
        first GRU and computing the final results. Default: 1
      * bias -- If "False", then the layer does not use bias
        weights b_ih and b_hh. Default: "True"
      * batch_first -- If "True", then the input and output
        tensors are provided as (batch, seq, feature). Default:
        "False"
      * dropout -- If non-zero, introduces a Dropout layer on
        the outputs of each GRU layer except the last layer, with


dropout probability equal to "dropout". Default: 0
      * bidirectional -- If "True", becomes a bidirectional GRU.
        Default: "False"
   Inputs: input, h_0
      * input of shape (seq_len, batch, input_size): tensor
        containing the features of the input sequence. The input can
        also be a packed variable length sequence. See
        "torch.nn.utils.rnn.pack_padded_sequence()" for details.
      * h_0 of shape (num_layers * num_directions, batch,
        hidden_size): tensor containing the initial hidden state for
        each element in the batch. Defaults to zero if not provided.
        If the RNN is bidirectional, num_directions should be 2, else
        it should be 1.
   Outputs: output, h_n
      * output of shape (seq_len, batch, num_directions *
        hidden_size): tensor containing the output features h_t from
        the last layer of the GRU, for each t. If a
        "torch.nn.utils.rnn.PackedSequence" has been given as the


input, the output will also be a packed sequence. For the
        unpacked case, the directions can be separated using
        "output.view(seq_len, batch, num_directions, hidden_size)",
        with forward and backward being direction 0 and 1
        respectively.
        Similarly, the directions can be separated in the packed case.
      * h_n of shape (num_layers * num_directions, batch,
        hidden_size): tensor containing the hidden state for t =
        seq_len
        Like output, the layers can be separated using
        "h_n.view(num_layers, num_directions, batch, hidden_size)".
   Shape:
      * Input1: (L, N, H_{in}) tensor containing input features where
        H_{in}=\text{input_size} and L represents a sequence
        length.
      * Input2: (S, N, H_{out}) tensor containing the initial hidden
        state for each element in the batch.
        H_{out}=\text{hidden_size} Defaults to zero if not provided.


where S=\text{num_layers} * \text{num_directions} If the RNN
        is bidirectional, num_directions should be 2, else it should
        be 1.
      * Output1: (L, N, H_{all}) where H_{all}=\text{num_directions}
        * \text{hidden_size}
      * Output2: (S, N, H_{out}) tensor containing the next hidden
        state for each element in the batch
   Variables:
      * weight_ih_l[k] -- the learnable input-hidden weights of
        the \text{k}^{th} layer (W_ir|W_iz|W_in), of shape
        (3hidden_size, input_size) for k = 0. Otherwise, the
        shape is (3hidden_size, num_directions * hidden_size)
      * weight_hh_l[k] -- the learnable hidden-hidden weights of
        the \text{k}^{th} layer (W_hr|W_hz|W_hn), of shape
        (3hidden_size, hidden_size)
      * bias_ih_l[k] -- the learnable input-hidden bias of the
        \text{k}^{th} layer (b_ir|b_iz|b_in), of shape
        (3hidden_size)
      * bias_hh_l[k] -- the learnable hidden-hidden bias of the


\text{k}^{th} layer (b_hr|b_hz|b_hn), of shape
        (3hidden_size)*
   Note:
     All the weights and biases are initialized from
     \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
     \frac{1}{\text{hidden_size}}
   Note:
     If the following conditions are satisfied: 1) cudnn is enabled,
     2) input data is on the GPU 3) input data has dtype
     "torch.float16" 4) V100 GPU is used, 5) input data is not in
     "PackedSequence" format persistent algorithm can be selected to
     improve performance.
   Examples:
      >>> rnn = nn.GRU(10, 20, 2)
      >>> input = torch.randn(5, 3, 10)
      >>> h0 = torch.randn(2, 3, 20)
      >>> output, hn = rnn(input, h0)


update_bn_statsclass torch.ao.nn.intrinsic.qat.update_bn_stats(mod)


torch.Tensor.crow_indicesTensor.crow_indices() -> IntTensor
   Returns the tensor containing the compressed row indices of the
   "self" tensor when "self" is a sparse CSR tensor of layout
   "sparse_csr". The "crow_indices" tensor is strictly of shape
   ("self".size(0) + 1) and of type "int32" or "int64". When using MKL
   routines such as sparse matrix multiplication, it is necessary to
   use "int32" indexing in order to avoid downcasting and potentially
   losing information.
   Example::
      >>> csr = torch.eye(5,5).to_sparse_csr()
      >>> csr.crow_indices()
      tensor([0, 1, 2, 3, 4, 5], dtype=torch.int32)


torch.Tensor.addTensor.add(other, *, alpha=1) -> Tensor
   Add a scalar or tensor to "self" tensor. If both "alpha" and
   "other" are specified, each element of "other" is scaled by "alpha"
   before being used.
   When "other" is a tensor, the shape of "other" must be
   broadcastable with the shape of the underlying tensor
   See "torch.add()"


torch.cuda.get_device_nametorch.cuda.get_device_name(device=None)
   Gets the name of a device.
   Parameters:
      device (torch.device or int, optional) -- device
      for which to return the name. This function is a no-op if this
      argument is a negative integer. It uses the current device,
      given by "current_device()", if "device" is "None" (default).
   Returns:
      the name of the device
   Return type:
      str


torch.Tensor.reciprocalTensor.reciprocal() -> Tensor
   See "torch.reciprocal()"


torch.autograd.functional.vjptorch.autograd.functional.vjp(func, inputs, v=None, create_graph=False, strict=False)
   Function that computes the dot product between a vector "v" and the
   Jacobian of the given function at the point given by the inputs.
   Parameters:
      * func (function) -- a Python function that takes Tensor
        inputs and returns a tuple of Tensors or a Tensor.
      * inputs (tuple of Tensors or Tensor) -- inputs to the
        function "func".
      * v (tuple of Tensors or Tensor) -- The vector for
        which the vector Jacobian product is computed.  Must be the
        same size as the output of "func". This argument is optional
        when the output of "func" contains a single element and (if it
        is not provided) will be set as a Tensor containing a single
        "1".
      * create_graph (bool, optional) -- If "True", both the
        output and result will be computed in a differentiable way.


Note that when "strict" is "False", the result can not require
        gradients or be disconnected from the inputs.  Defaults to
        "False".
      * strict (bool, optional) -- If "True", an error will
        be raised when we detect that there exists an input such that
        all the outputs are independent of it. If "False", we return a
        Tensor of zeros as the vjp for said inputs, which is the
        expected mathematical value. Defaults to "False".
   Returns:
      tuple with:
         func_output (tuple of Tensors or Tensor): output of
         "func(inputs)"
         vjp (tuple of Tensors or Tensor): result of the dot product
         with the same shape as the inputs.
   Return type:
      output (tuple)
   -[ Example ]-

def exp_reducer(x):
   ...     return x.exp().sum(dim=1)
inputs = torch.rand(4, 4)
v = torch.ones(4)
vjp(exp_reducer, inputs, v)
   (tensor([5.7817, 7.2458, 5.7830, 6.7782]),
    tensor([[1.4458, 1.3962, 1.3042, 1.6354],


tensor([[1.4458, 1.3962, 1.3042, 1.6354],
           [2.1288, 1.0652, 1.5483, 2.5035],
           [2.2046, 1.1292, 1.1432, 1.3059],
           [1.3225, 1.6652, 1.7753, 2.0152]]))

vjp(exp_reducer, inputs, v, create_graph=True)
   (tensor([5.7817, 7.2458, 5.7830, 6.7782], grad_fn=),
    tensor([[1.4458, 1.3962, 1.3042, 1.6354],
           [2.1288, 1.0652, 1.5483, 2.5035],
           [2.2046, 1.1292, 1.1432, 1.3059],
           [1.3225, 1.6652, 1.7753, 2.0152]], grad_fn=))
def adder(x, y):
   ...     return 2 * x + 3 * y
inputs = (torch.rand(2), torch.rand(2))
v = torch.ones(2)
vjp(adder, inputs, v)
   (tensor([2.4225, 2.3340]),
    (tensor([2., 2.]), tensor([3., 3.])))


torch.nan_to_numtorch.nan_to_num(input, nan=0.0, posinf=None, neginf=None, , out=None) -> Tensor
   Replaces "NaN", positive infinity, and negative infinity values in
   "input" with the values specified by "nan", "posinf", and "neginf",
   respectively. By default, "NaN"s are replaced with zero, positive
   infinity is replaced with the greatest finite value representable
   by "input"'s dtype, and negative infinity is replaced with the
   least finite value representable by "input"'s dtype.
   Parameters:
      * input (Tensor) -- the input tensor.
      * nan (Number, optional) -- the value to replace
        "NaN"s with. Default is zero.
      * posinf (Number, optional) -- if a Number, the value
        to replace positive infinity values with. If None, positive
        infinity values are replaced with the greatest finite value
        representable by "input"'s dtype. Default is None.
      * neginf (Number, optional*) -- if a Number, the value


to replace negative infinity values with. If None, negative
        infinity values are replaced with the lowest finite value
        representable by "input"'s dtype. Default is None.
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   Example:
      >>> x = torch.tensor([float('nan'), float('inf'), -float('inf'), 3.14])
      >>> torch.nan_to_num(x)
      tensor([ 0.0000e+00,  3.4028e+38, -3.4028e+38,  3.1400e+00])
      >>> torch.nan_to_num(x, nan=2.0)
      tensor([ 2.0000e+00,  3.4028e+38, -3.4028e+38,  3.1400e+00])
      >>> torch.nan_to_num(x, nan=2.0, posinf=1.0)
      tensor([ 2.0000e+00,  1.0000e+00, -3.4028e+38,  3.1400e+00])


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


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

pool of cubic window of size=3, and target output size 13x12x11


m = nn.FractionalMaxPool3d(3, output_size=(13, 12, 11))
pool of cubic window and target output size being half of input size
m = nn.FractionalMaxPool3d(3, output_ratio=(0.5, 0.5, 0.5))
input = torch.randn(20, 16, 50, 32, 16)
output = m(input)


torch.Tensor.gerTensor.ger(vec2) -> Tensor
   See "torch.ger()"


torch.Tensor.col_indicesTensor.col_indices() -> IntTensor
   Returns the tensor containing the column indices of the "self"
   tensor when "self" is a sparse CSR tensor of layout "sparse_csr".
   The "col_indices" tensor is strictly of shape ("self".nnz()) and of
   type "int32" or "int64".  When using MKL routines such as sparse
   matrix multiplication, it is necessary to use "int32" indexing in
   order to avoid downcasting and potentially losing information.
   Example::
      >>> csr = torch.eye(5,5).to_sparse_csr()
      >>> csr.col_indices()
      tensor([0, 1, 2, 3, 4], dtype=torch.int32)


torch.Tensor.uniform_Tensor.uniform_(from=0, to=1) -> Tensor
   Fills "self" tensor with numbers sampled from the continuous
   uniform distribution:
      P(x) = \dfrac{1}{\text{to} - \text{from}}


torch.Tensor.deviceTensor.device
   Is the "torch.device" where this Tensor is.


torch.Tensor.unfoldTensor.unfold(dimension, size, step) -> Tensor
   Returns a view of the original tensor which contains all slices of
   size "size" from "self" tensor in the dimension "dimension".
   Step between two slices is given by "step".
   If sizedim is the size of dimension "dimension" for "self", the
   size of dimension "dimension" in the returned tensor will be
   (sizedim - size) / step + 1.
   An additional dimension of size "size" is appended in the returned
   tensor.
   Parameters:
      * dimension (int) -- dimension in which unfolding happens
      * size (int) -- the size of each slice that is unfolded
      * step (int) -- the step between each slice
   Example:
      >>> x = torch.arange(1., 8)
      >>> x
      tensor([ 1.,  2.,  3.,  4.,  5.,  6.,  7.])
      >>> x.unfold(0, 2, 1)
      tensor([[ 1.,  2.],
              [ 2.,  3.],
              [ 3.,  4.],
              [ 4.,  5.],
              [ 5.,  6.],
              [ 6.,  7.]])


[ 6.,  7.]])
      >>> x.unfold(0, 2, 2)
      tensor([[ 1.,  2.],
              [ 3.,  4.],
              [ 5.,  6.]])


torch._foreach_logtorch._foreach_log(self: List[Tensor]) -> List[Tensor]
   Apply "torch.log()" to each Tensor of the input list.


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


Tanhclass torch.nn.Tanh
   Applies the Hyperbolic Tangent (Tanh) function element-wise.
   Tanh is defined as:
      \text{Tanh}(x) = \tanh(x) = \frac{\exp(x) - \exp(-x)} {\exp(x) +
      \exp(-x)}
   Shape:
      * Input: (), where * means any number of dimensions.
      * Output: (), same shape as the input.
   [image]
   Examples:
      >>> m = nn.Tanh()
      >>> input = torch.randn(2)
      >>> output = m(input)


torch.trapztorch.trapz(y, x, *, dim=- 1) -> Tensor
   Alias for "torch.trapezoid()".


torch.Tensor.geometric_Tensor.geometric_(p, *, generator=None) -> Tensor
   Fills "self" tensor with elements drawn from the geometric
   distribution:
      f(X=k) = (1 - p)^{k - 1} p


torch.nn.functional.layer_normtorch.nn.functional.layer_norm(input, normalized_shape, weight=None, bias=None, eps=1e-05)
   Applies Layer Normalization for last certain number of dimensions.
   See "LayerNorm" for details.
   Return type:
      Tensor


torch.isinftorch.isinf(input) -> Tensor
   Tests if each element of "input" is infinite (positive or negative
   infinity) or not.
   Note:
     Complex values are infinite when their real or imaginary part is
     infinite.
   Parameters:
      input (Tensor) -- the input tensor.
   Returns:
      A boolean tensor that is True where "input" is infinite and
      False elsewhere
   Example:
      >>> torch.isinf(torch.tensor([1, float('inf'), 2, float('-inf'), float('nan')]))
      tensor([False,  True,  False,  True,  False])


Attributeclass torch.jit.Attribute(value, type)
   This method is a pass-through function that returns value, mostly
   used to indicate to the TorchScript compiler that the left-hand
   side expression is a class instance attribute with type of type.
   Note that torch.jit.Attribute should only be used in init
   method of jit.ScriptModule subclasses.
   Though TorchScript can infer correct type for most Python
   expressions, there are some cases where type inference can be
   wrong, including:
   * Empty containers like [] and {}, which TorchScript assumes to
     be container of Tensor
   * Optional types like Optional[T] but assigned a valid value of
     type T, TorchScript would assume it is type T rather than
     Optional[T]
   In eager mode, it is simply a pass-through function that returns
   value without other implications.
   Example:
      import torch
      from typing import Dict
      class AttributeModule(torch.jit.ScriptModule):


def init(self):
              super(AttributeModule, self).init()
              self.foo = torch.jit.Attribute(0.1, float)
              # we should be able to use self.foo as a float here
              assert 0.0 < self.foo
              self.names_ages = torch.jit.Attribute({}, Dict[str, int])
              self.names_ages["someone"] = 20
              assert isinstance(self.names_ages["someone"], int)
      m = AttributeModule()
      # m will contain two attributes
      # 1. foo of type float
      # 2. names_ages of type Dict[str, int]
   Note: it's now preferred to instead use type annotations instead of
   torch.jit.Annotate:
      import torch
      from typing import Dict
      class AttributeModule(torch.nn.Module):
          names: Dict[str, int]
          def init(self):
              super(AttributeModule, self).init()
              self.names = {}
      m = AttributeModule()
   Parameters:
      * value -- An initial value to be assigned to attribute.


type -- A Python type
   Returns:
      Returns value
   count(value, /)
      Return number of occurrences of value.
   index(value, start=0, stop=9223372036854775807, /)
      Return first index of value.
      Raises ValueError if the value is not present.
   type
      Alias for field number 1
   value
      Alias for field number 0


torch.Tensor.longTensor.long(memory_format=torch.preserve_format) -> Tensor
   "self.long()" is equivalent to "self.to(torch.int64)". See "to()".
   Parameters:
      memory_format ("torch.memory_format", optional) -- the
      desired memory format of returned Tensor. Default:
      "torch.preserve_format".


torch.Tensor.mvlgammaTensor.mvlgamma(p) -> Tensor
   See "torch.mvlgamma()"


torch.Tensor.nan_to_num_Tensor.nan_to_num_(nan=0.0, posinf=None, neginf=None) -> Tensor
   In-place version of "nan_to_num()".


ConvBn3dclass torch.ao.nn.intrinsic.ConvBn3d(conv, bn)
   This is a sequential container which calls the Conv 3d and Batch
   Norm 3d modules. During quantization this will be replaced with the
   corresponding fused module.


torch.Tensor.argminTensor.argmin(dim=None, keepdim=False) -> LongTensor
   See "torch.argmin()"


torch.asinhtorch.asinh(input, , out=None) -> Tensor
   Returns a new tensor with the inverse hyperbolic sine of the
   elements of "input".
      \text{out}{i} = \sinh^{-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.1606, -1.4267, -1.0899, -1.0250 ])
      >>> torch.asinh(a)
      tensor([ 0.1599, -1.1534, -0.9435, -0.8990 ])


torch.signal.windows.kaisertorch.signal.windows.kaiser(M, , beta=12.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False)
   Computes the Kaiser window.
   The Kaiser window is defined as follows:
      w_n = I_0 \left( \beta \sqrt{1 - \left( {\frac{n - N/2}{N/2}}
      \right) ^2 } \right) / I_0( \beta )
   where "I_0" is the zeroth order modified Bessel function of the
   first kind (see "torch.special.i0()"), and "N = M - 1 if sym else
   M".
   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:
      * beta (float, optional) -- shape parameter for the
        window. Must be non-negative. Default: 12.0
      * 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:


Return type:
      Tensor
   Examples:
      >>> # Generates a symmetric gaussian window with a standard deviation of 1.0.
      >>> torch.signal.windows.kaiser(5)
      tensor([4.0065e-05, 2.1875e-03, 4.3937e-02, 3.2465e-01, 8.8250e-01, 8.8250e-01, 3.2465e-01, 4.3937e-02, 2.1875e-03, 4.0065e-05])
      >>> # Generates a periodic gaussian window and standard deviation equal to 0.9.
      >>> torch.signal.windows.kaiser(5, sym=False,std=0.9)
      tensor([1.9858e-07, 5.1365e-05, 3.8659e-03, 8.4658e-02, 5.3941e-01, 1.0000e+00, 5.3941e-01, 8.4658e-02, 3.8659e-03, 5.1365e-05])


torch.linalg.crosstorch.linalg.cross(input, other, , dim=- 1, out=None) -> Tensor
   Computes the cross product of two 3-dimensional vectors.
   Supports input of float, double, cfloat and cdouble dtypes. Also
   supports batches of vectors, for which it computes the product
   along the dimension "dim". It broadcasts over the batch dimensions.
   Parameters:
      * input (Tensor) -- the first input tensor.
      * other (Tensor) -- the second input tensor.
      * dim (int, optional) -- the dimension along which to
        take the cross-product. Default: -1.
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor. Ignored
      if None. Default: None*.
   -[ Example ]-

a = torch.randn(4, 3)
a
   tensor([[-0.3956,  1.1455,  1.6895],
           [-0.5849,  1.3672,  0.3599],
           [-1.1626,  0.7180, -0.0521],
           [-0.1339,  0.9902, -2.0225]])
b = torch.randn(4, 3)
b


b = torch.randn(4, 3)
b
   tensor([[-0.0257, -1.4725, -1.2251],
           [-1.1479, -0.7005, -1.9757],
           [-1.3904,  0.3726, -1.1836],
           [-0.9688, -0.7153,  0.2159]])
torch.linalg.cross(a, b)
   tensor([[ 1.0844, -0.5281,  0.6120],
           [-2.4490, -1.5687,  1.9792],
           [-0.8304, -1.3037,  0.5650],
           [-1.2329,  1.9883,  1.0551]])
a = torch.randn(1, 3)  # a is broadcast to match shape of b
a
   tensor([[-0.9941, -0.5132,  0.5681]])
torch.linalg.cross(a, b)
   tensor([[ 1.4653, -1.2325,  1.4507],
           [ 1.4119, -2.6163,  0.1073],
           [ 0.3957, -1.9666, -1.0840],
           [ 0.2956, -0.3357,  0.2139]])


torch.combinationstorch.combinations(input, r=2, with_replacement=False) -> seq
   Compute combinations of length r of the given tensor. The behavior
   is similar to python's itertools.combinations when
   with_replacement is set to False, and
   itertools.combinations_with_replacement when with_replacement
   is set to True.
   Parameters:
      * input (Tensor) -- 1D vector.
      * r (int, optional) -- number of elements to combine
      * with_replacement (bool, optional) -- whether to
        allow duplication in combination
   Returns:
      A tensor equivalent to converting all the input tensors into
      lists, do itertools.combinations or
      itertools.combinations_with_replacement on these lists, and
      finally convert the resulting list into tensor.
   Return type:
      Tensor
   Example:
      >>> a = [1, 2, 3]
      >>> list(itertools.combinations(a, r=2))
      [(1, 2), (1, 3), (2, 3)]


[(1, 2), (1, 3), (2, 3)]
      >>> list(itertools.combinations(a, r=3))
      [(1, 2, 3)]
      >>> list(itertools.combinations_with_replacement(a, r=2))
      [(1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)]
      >>> tensor_a = torch.tensor(a)
      >>> torch.combinations(tensor_a)
      tensor([[1, 2],
              [1, 3],
              [2, 3]])
      >>> torch.combinations(tensor_a, r=3)
      tensor([[1, 2, 3]])
      >>> torch.combinations(tensor_a, with_replacement=True)
      tensor([[1, 1],
              [1, 2],
              [1, 3],
              [2, 2],
              [2, 3],
              [3, 3]])


Unfoldclass torch.nn.Unfold(kernel_size, dilation=1, padding=0, stride=1)
   Extracts sliding local blocks from a batched input tensor.
   Consider a batched "input" tensor of shape (N, C, *), where N is
   the batch dimension, C is the channel dimension, and * represent
   arbitrary spatial dimensions. This operation flattens each sliding
   "kernel_size"-sized block within the spatial dimensions of "input"
   into a column (i.e., last dimension) of a 3-D "output" tensor of
   shape (N, C \times \prod(\text{kernel_size}), L), where C \times
   \prod(\text{kernel_size}) is the total number of values within
   each block (a block has \prod(\text{kernel_size}) spatial
   locations each containing a C-channeled vector), and L is the total
   number of such blocks:
      L = \prod_d \left\lfloor\frac{\text{spatial_size}[d] + 2 \times
      \text{padding}[d] %     - \text{dilation}[d] \times
      (\text{kernel_size}[d] - 1) - 1}{\text{stride}[d]} +
      1\right\rfloor,


1\right\rfloor,
   where \text{spatial_size} is formed by the spatial dimensions of
   "input" ( above), and d is over all spatial dimensions.
   Therefore, indexing "output" at the last dimension (column
   dimension) gives all values within a certain block.
   The "padding", "stride" and "dilation" arguments specify how the
   sliding blocks are retrieved.
   * "stride" controls the stride for the sliding blocks.
   * "padding" controls the amount of implicit zero-paddings on both
     sides for "padding" number of points for each dimension before
     reshaping.
   * "dilation" controls the spacing between the kernel points; also
     known as the Ã  trous algorithm. It is harder to describe, but
     this link has a nice visualization of what "dilation" does.
   Parameters:
      * kernel_size (int or tuple) -- the size of the
        sliding blocks
      * dilation (int or tuple, optional*) -- a parameter
        that controls the stride of elements within the neighborhood.


Default: 1
      * padding (int or tuple, optional) -- implicit
        zero padding to be added on both sides of input. Default: 0
      * stride (int or tuple, optional) -- the stride of
        the sliding blocks in the input spatial dimensions. Default: 1
   * If "kernel_size", "dilation", "padding" or "stride" is an int or
     a tuple of length 1, their values will be replicated across all
     spatial dimensions.
   * For the case of two input spatial dimensions this operation is
     sometimes called "im2col".
   Note:
     "Fold" calculates each combined value in the resulting large
     tensor by summing all values from all containing blocks. "Unfold"
     extracts the values in the local blocks by copying from the large
     tensor. So, if the blocks overlap, they are not inverses of each
     other.In general, folding and unfolding operations are related as
     follows. Consider "Fold" and "Unfold" instances created with the
     same parameters:


same parameters:
     >>> fold_params = dict(kernel_size=..., dilation=..., padding=..., stride=...)
     >>> fold = nn.Fold(output_size=..., fold_params)
     >>> unfold = nn.Unfold(fold_params)
     Then for any (supported) "input" tensor the following equality
     holds:
        fold(unfold(input)) == divisor * input
     where "divisor" is a tensor that depends only on the shape and
     dtype of the "input":
     >>> input_ones = torch.ones(input.shape, dtype=input.dtype)
     >>> divisor = fold(unfold(input_ones))
     When the "divisor" tensor contains no zero elements, then "fold"
     and "unfold" operations are inverses of each other (up to
     constant divisor).
   Warning:
     Currently, only 4-D input tensors (batched image-like tensors)
     are supported.
   Shape:
      * Input: (N, C, *)
      * Output: (N, C \times \prod(\text{kernel_size}), L) as
        described above
   Examples:
      >>> unfold = nn.Unfold(kernel_size=(2, 3))
      >>> input = torch.randn(2, 5, 3, 4)


input = torch.randn(2, 5, 3, 4)
      >>> output = unfold(input)
      >>> # each patch contains 30 values (2x3=6 vectors, each of 5 channels)
      >>> # 4 blocks (2x3 kernels) in total in the 3x4 input
      >>> output.size()
      torch.Size([2, 30, 4])
      >>> # Convolution is equivalent with Unfold + Matrix Multiplication + Fold (or view to output shape)
      >>> inp = torch.randn(1, 3, 10, 12)
      >>> w = torch.randn(2, 3, 4, 5)
      >>> inp_unf = torch.nn.functional.unfold(inp, (4, 5))
      >>> out_unf = inp_unf.transpose(1, 2).matmul(w.view(w.size(0), -1).t()).transpose(1, 2)
      >>> out = torch.nn.functional.fold(out_unf, (7, 8), (1, 1))
      >>> # or equivalently (and avoiding a copy),
      >>> # out = out_unf.view(1, 2, 7, 8)
      >>> (torch.nn.functional.conv2d(inp, w) - out).abs().max()
      tensor(1.9073e-06)


torch.unique_consecutivetorch.unique_consecutive(args, kwargs)
   Eliminates all but the first element from every consecutive group
   of equivalent elements.
   Note:
     This function is different from "torch.unique()" in the sense
     that this function only eliminates consecutive duplicate values.
     This semantics is similar to std::unique in C++.
   Parameters:
      * input (Tensor) -- the input tensor
      * return_inverse (bool) -- Whether to also return the
        indices for where elements in the original input ended up in
        the returned unique list.
      * return_counts (bool) -- Whether to also return the
        counts for each unique element.
      * dim (int) -- the dimension to apply unique. If "None",
        the unique of the flattened input is returned. default: "None"
   Returns:
      A tensor or a tuple of tensors containing
         * output (Tensor*): the output list of unique scalar
           elements.


elements.
         * inverse_indices (Tensor): (optional) if
           "return_inverse" is True, there will be an additional
           returned tensor (same shape as input) representing the
           indices for where elements in the original input map to in
           the output; otherwise, this function will only return a
           single tensor.
         * counts (Tensor): (optional) if "return_counts" is
           True, there will be an additional returned tensor (same
           shape as output or output.size(dim), if dim was specified)
           representing the number of occurrences for each unique
           value or tensor.
   Return type:
      (Tensor, Tensor (optional), Tensor (optional))
   Example:
      >>> x = torch.tensor([1, 1, 2, 2, 3, 1, 1, 2])
      >>> output = torch.unique_consecutive(x)
      >>> output
      tensor([1, 2, 3, 1, 2])
      >>> output, inverse_indices = torch.unique_consecutive(x, return_inverse=True)
      >>> output


output
      tensor([1, 2, 3, 1, 2])
      >>> inverse_indices
      tensor([0, 0, 1, 1, 2, 3, 3, 4])
      >>> output, counts = torch.unique_consecutive(x, return_counts=True)
      >>> output
      tensor([1, 2, 3, 1, 2])
      >>> counts
      tensor([2, 2, 1, 2, 1])


torch.tracetorch.trace(input) -> Tensor
   Returns the sum of the elements of the diagonal of the input 2-D
   matrix.
   Example:
      >>> x = torch.arange(1., 10.).view(3, 3)
      >>> x
      tensor([[ 1.,  2.,  3.],
              [ 4.,  5.,  6.],
              [ 7.,  8.,  9.]])
      >>> torch.trace(x)
      tensor(15.)


SoftMarginLossclass torch.nn.SoftMarginLoss(size_average=None, reduce=None, reduction='mean')
   Creates a criterion that optimizes a two-class classification
   logistic loss between input tensor x and target tensor y
   (containing 1 or -1).
      \text{loss}(x, y) = \sum_i \frac{\log(1 +
      \exp(-y[i]x[i]))}{\text{x.nelement}()}
   Parameters:
      * size_average (bool, optional) -- Deprecated (see
        "reduction"). By default, the losses are averaged over each
        loss element in the batch. Note that for some losses, there
        are multiple elements per sample. If the field "size_average"
        is set to "False", the losses are instead summed for each
        minibatch. Ignored when "reduce" is "False". Default: "True"
      * reduce (bool, optional*) -- Deprecated (see
        "reduction"). By default, the losses are averaged or summed
        over observations for each minibatch depending on


"size_average". When "reduce" is "False", returns a loss per
        batch element instead and ignores "size_average". Default:
        "True"
      * reduction (str, optional) -- Specifies the reduction
        to apply to the output: "'none'" | "'mean'" | "'sum'".
        "'none'": no reduction will be applied, "'mean'": the sum of
        the output will be divided by the number of elements in the
        output, "'sum'": the output will be summed. Note:
        "size_average" and "reduce" are in the process of being
        deprecated, and in the meantime, specifying either of those
        two args will override "reduction". Default: "'mean'"
   Shape:
      * Input: (), where * means any number of dimensions.
      * Target: (), same shape as the input.
      * Output: scalar. If "reduction" is "'none'", then (*), same
        shape as input.


get_default_qat_qconfig_mappingclass torch.ao.quantization.qconfig_mapping.get_default_qat_qconfig_mapping(backend='x86', version=1)
   Return the default QConfigMapping for quantization aware training.
   Parameters:
      * backend () -- the quantization backend for the default
        qconfig mapping, should be one of ["x86" (default), "fbgemm",
        "qnnpack", "onednn"]
      * *version (*) -- the version for the default qconfig
        mapping
   Return type:
      QConfigMapping


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


sparse = dense.to_sparse_csr()
      >>> sparse_bsr = sparse.to_sparse_bsr((5, 5))
      >>> sparse_bsr.col_indices()
      tensor([0, 1, 0, 1])
      >>> dense = torch.zeros(4, 3, 1)
      >>> dense[0:2, 0] = dense[0:2, 2] = dense[2:4, 1] = 1
      >>> dense.to_sparse_bsr((2, 1), 1)
      tensor(crow_indices=tensor([0, 2, 3]),
             col_indices=tensor([0, 2, 1]),
             values=tensor([[[[1.]],
                             [[1.]]],
                            [[[1.]],
                             [[1.]]],
                            [[[1.]],
                             [[1.]]]]), size=(4, 3, 1), nnz=3,
             layout=torch.sparse_bsr)


torch.Tensor.innerTensor.inner(other) -> Tensor
   See "torch.inner()".


torch.index_selecttorch.index_select(input, dim, index, , out=None) -> Tensor
   Returns a new tensor which indexes the "input" tensor along
   dimension "dim" using the entries in "index" which is a
   LongTensor.
   The returned tensor has the same number of dimensions as the
   original tensor ("input").  The "dim"th dimension has the same size
   as the length of "index"; other dimensions have the same size as in
   the original tensor.
   Note:
     The returned tensor does not use the same storage as the
     original tensor.  If "out" has a different shape than expected,
     we silently change it to the correct shape, reallocating the
     underlying storage if necessary.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dim (int) -- the dimension in which we index
      * index (IntTensor or LongTensor*) -- the 1-D tensor
        containing the indices to index
   Keyword Arguments:


Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   Example:
      >>> x = torch.randn(3, 4)
      >>> x
      tensor([[ 0.1427,  0.0231, -0.5414, -1.0009],
              [-0.4664,  0.2647, -0.1228, -1.1068],
              [-1.1734, -0.6571,  0.7230, -0.6004]])
      >>> indices = torch.tensor([0, 2])
      >>> torch.index_select(x, 0, indices)
      tensor([[ 0.1427,  0.0231, -0.5414, -1.0009],
              [-1.1734, -0.6571,  0.7230, -0.6004]])
      >>> torch.index_select(x, 1, indices)
      tensor([[ 0.1427, -0.5414],
              [-0.4664, -0.1228],
              [-1.1734,  0.7230]])


torch.igammactorch.igammac(input, other, *, out=None) -> Tensor
   Alias for "torch.special.gammaincc()".


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


be zero-ed.
      * inplace (bool, optional) -- If set to "True", will
        do this operation in-place
   Warning:
     Due to historical reasons, this class will perform 1D channel-
     wise dropout for 3D inputs (as done by "nn.Dropout1d"). Thus, it
     currently does NOT support inputs without a batch dimension of
     shape (C, H, W). This behavior will change in a future release to
     interpret 3D inputs as no-batch-dim inputs. To maintain the old
     behavior, switch to "nn.Dropout1d".
   Shape:
      * Input: (N, C, H, W) or (N, C, L).
      * Output: (N, C, H, W) or (N, C, L) (same shape as input).
   Examples:
      >>> m = nn.Dropout2d(p=0.2)
      >>> input = torch.randn(20, 16, 32, 32)
      >>> output = m(input)


torch.Tensor.logical_not_Tensor.logical_not_() -> Tensor
   In-place version of "logical_not()"


torch.linalg.svdtorch.linalg.svd(A, full_matrices=True, , driver=None, out=None)
   Computes the singular value decomposition (SVD) of a matrix.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, the full SVD of
   a matrix A \in \mathbb{K}^{m \times n}, if k = min(m,n), is
   defined as
      A = U \operatorname{diag}(S) V^{\text{H}} \mathrlap{\qquad U \in
      \mathbb{K}^{m \times m}, S \in \mathbb{R}^k, V \in \mathbb{K}^{n
      \times n}}
   where \operatorname{diag}(S) \in \mathbb{K}^{m \times n},
   V^{\text{H}} is the conjugate transpose when V is complex, and the
   transpose when V is real-valued. The matrices  U, V (and thus
   V^{\text{H}}) are orthogonal in the real case, and unitary in the
   complex case.
   When m > n (resp. m < n) we can drop the last m - n (resp. n
   - m) columns of U (resp. V) to form the reduced SVD*:
      A = U \operatorname{diag}(S) V^{\text{H}} \mathrlap{\qquad U \in


\mathbb{K}^{m \times k}, S \in \mathbb{R}^k, V \in \mathbb{K}^{k
      \times n}}
   where \operatorname{diag}(S) \in \mathbb{K}^{k \times k}. In this
   case, U and V also have orthonormal columns.
   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.
   The returned decomposition is a named tuple (U, S, Vh) which
   corresponds to U, S, V^{\text{H}} above.
   The singular values are returned in descending order.
   The parameter "full_matrices" chooses between the full (default)
   and reduced SVD.
   The "driver" kwarg may be used in CUDA with a cuSOLVER backend to
   choose the algorithm used to compute the SVD. The choice of a
   driver is a trade-off between accuracy and speed.
   * If "A" is well-conditioned (its condition number is not too
     large), or you do not mind some precision loss.
     * For a general matrix: 'gesvdj' (Jacobi method)


If "A" is tall or wide (m >> n or m << n): 'gesvda'
       (Approximate method)
If "A" is not well-conditioned or precision is relevant:
     'gesvd' (QR based)
   By default ("driver"= None), we call 'gesvdj' and, if it fails,
   we fallback to 'gesvd'.
   Differences with numpy.linalg.svd:
Unlike numpy.linalg.svd, this function always returns a tuple
     of three tensors and it doesn't support compute_uv argument.
     Please use "torch.linalg.svdvals()", which computes only the
     singular values, instead of compute_uv=False.
   Note:
     When "full_matrices"= True, the gradients with respect to
     U[..., :, min(m, n):] and Vh[..., min(m, n):, :] will be
     ignored, as those vectors can be arbitrary bases of the
     corresponding subspaces.
   Warning:
     The returned tensors U and V are not unique, nor are they
     continuous with respect to "A". Due to this lack of uniqueness,
     different hardware and software may compute different singular


vectors.This non-uniqueness is caused by the fact that
     multiplying any pair of singular vectors u_k, v_k by -1 in the
     real case or by e^{i \phi}, \phi \in \mathbb{R} in the complex
     case produces another two valid singular vectors of the matrix.
     For this reason, the loss function shall not depend on this e^{i
     \phi} quantity, as it is not well-defined. This is checked for
     complex inputs when computing the gradients of this function. As
     such, when inputs are complex and are on a CUDA device, the
     computation of the gradients of this function synchronizes that
     device with the CPU.
   Warning:
     Gradients computed using U or Vh will only be finite when "A"
     does not have repeated singular values. If "A" is rectangular,
     additionally, zero must also not be one of its singular values.
     Furthermore, if the distance between any two singular values is
     close to zero, the gradient will be numerically unstable, as it


depends on the singular values \sigma_i through the computation
     of \frac{1}{\min_{i \neq j} \sigma_i^2 - \sigma_j^2}. In the
     rectangular case, the gradient will also be numerically unstable
     when "A" has small singular values, as it also depends on the
     computation of \frac{1}{\sigma_i}.
   See also:
     "torch.linalg.svdvals()" computes only the singular values.
     Unlike "torch.linalg.svd()", the gradients of "svdvals()" are
     always numerically stable.
     "torch.linalg.eig()" for a function that computes another type of
     spectral decomposition of a matrix. The eigendecomposition works
     just on square matrices.
     "torch.linalg.eigh()" for a (faster) function that computes the
     eigenvalue decomposition for Hermitian and symmetric matrices.
     "torch.linalg.qr()" for another (much faster) decomposition that
     works on general matrices.
   Parameters:
      * A (Tensor) -- tensor of shape (, m, n)* where *** is
        zero or more batch dimensions.


zero or more batch dimensions.
      * full_matrices (bool, optional) -- controls whether
        to compute the full or reduced SVD, and consequently, the
        shape of the returned tensors U and Vh. Default: True.
   Keyword Arguments:
      * driver (str, optional) -- name of the cuSOLVER
        method to be used. This keyword argument only works on CUDA
        inputs. Available options are: None, gesvd, gesvdj, and
        gesvda. Default: None.
      * out (tuple, optional) -- output tuple of three
        tensors. Ignored if None.
   Returns:
      A named tuple (U, S, Vh) which corresponds to U, S,
      V^{\text{H}} above.
      S will always be real-valued, even when "A" is complex. It
      will also be ordered in descending order.
      U and Vh will have the same dtype as "A". The left / right
      singular vectors will be given by the columns of U and the
      rows of Vh respectively.
   Examples:


rows of Vh respectively.
   Examples:
      >>> A = torch.randn(5, 3)
      >>> U, S, Vh = torch.linalg.svd(A, full_matrices=False)
      >>> U.shape, S.shape, Vh.shape
      (torch.Size([5, 3]), torch.Size([3]), torch.Size([3, 3]))
      >>> torch.dist(A, U @ torch.diag(S) @ Vh)
      tensor(1.0486e-06)
      >>> U, S, Vh = torch.linalg.svd(A)
      >>> U.shape, S.shape, Vh.shape
      (torch.Size([5, 5]), torch.Size([3]), torch.Size([3, 3]))
      >>> torch.dist(A, U[:, :3] @ torch.diag(S) @ Vh)
      tensor(1.0486e-06)
      >>> A = torch.randn(7, 5, 3)
      >>> U, S, Vh = torch.linalg.svd(A, full_matrices=False)
      >>> torch.dist(A, U @ torch.diag_embed(S) @ Vh)
      tensor(3.0957e-06)


torch.Tensor.record_streamTensor.record_stream(stream)
   Ensures that the tensor memory is not reused for another tensor
   until all current work queued on "stream" are complete.
   Note:
     The caching allocator is aware of only the stream where a tensor
     was allocated. Due to the awareness, it already correctly manages
     the life cycle of tensors on only one stream. But if a tensor is
     used on a stream different from the stream of origin, the
     allocator might reuse the memory unexpectedly. Calling this
     method lets the allocator know which streams have used the
     tensor.


torch.Tensor.squeeze_Tensor.squeeze_(dim=None) -> Tensor
   In-place version of "squeeze()"


LazyBatchNorm3dclass torch.nn.LazyBatchNorm3d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None)
   A "torch.nn.BatchNorm3d" module with lazy initialization of the
   "num_features" argument of the "BatchNorm3d" that is inferred from
   the "input.size(1)". The attributes that will be lazily initialized
   are weight, bias, running_mean and running_var.
   Check the "torch.nn.modules.lazy.LazyModuleMixin" for further
   documentation on lazy modules and their limitations.
   Parameters:
      * 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. Can be set to "None" for
        cumulative moving average (i.e. simple average). Default: 0.1
      * affine (bool) -- a boolean value that when set to
        "True", this module has learnable affine parameters. Default:
        "True"


"True"
      * 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 initializes statistics buffers
        "running_mean" and "running_var" as "None". When these buffers
        are "None", this module always uses batch statistics. in both
        training and eval modes. Default: "True"
   cls_to_become
      alias of "BatchNorm3d"


torch.foreach_reciprocal_torch._foreach_reciprocal(self: List[Tensor]) -> None
   Apply "torch.reciprocal()" to each Tensor of the input list.


torch.Tensor.tanTensor.tan() -> Tensor
   See "torch.tan()"


torch.Tensor.pinverseTensor.pinverse() -> Tensor
   See "torch.pinverse()"


torch.Tensor.is_contiguousTensor.is_contiguous(memory_format=torch.contiguous_format) -> bool
   Returns True if "self" tensor is contiguous in memory in the order
   specified by memory format.
   Parameters:
      memory_format ("torch.memory_format", optional) -- Specifies
      memory allocation order. Default: "torch.contiguous_format".


torch.Tensor.q_scaleTensor.q_scale() -> float
   Given a Tensor quantized by linear(affine) quantization, returns
   the scale of the underlying quantizer().


torch.get_deterministic_debug_modetorch.get_deterministic_debug_mode()
   Returns the current value of the debug mode for deterministic
   operations. Refer to "torch.set_deterministic_debug_mode()"
   documentation for more details.
   Return type:
      int


MultiLabelSoftMarginLossclass torch.nn.MultiLabelSoftMarginLoss(weight=None, size_average=None, reduce=None, reduction='mean')
   Creates a criterion that optimizes a multi-label one-versus-all
   loss based on max-entropy, between input x and target y of size (N,
   C). For each sample in the minibatch:
      loss(x, y) = - \frac{1}{C} * \sum_i y[i] * \log((1 +
      \exp(-x[i]))^{-1})                  + (1-y[i]) *
      \log\left(\frac{\exp(-x[i])}{(1 + \exp(-x[i]))}\right)
   where i \in \left{0, \; \cdots , \; \text{x.nElement}() -
   1\right}, y[i] \in \left{0, \; 1\right}.
   Parameters:
      * weight (Tensor, optional) -- a manual rescaling
        weight given to each class. If given, it has to be a Tensor of
        size C. Otherwise, it is treated as if having all ones.
      * size_average (bool, optional) -- Deprecated (see
        "reduction"). By default, the losses are averaged over each


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


deprecated, and in the meantime, specifying either of those
        two args will override "reduction". Default: "'mean'"
   Shape:
      * Input: (N, C) where N is the batch size and C is the
        number of classes.
      * Target: (N, C), label targets padded by -1 ensuring same shape
        as the input.
      * Output: scalar. If "reduction" is "'none'", then (N).


torch.nn.functional.foldtorch.nn.functional.fold(input, output_size, kernel_size, dilation=1, padding=0, stride=1)
   Combines an array of sliding local blocks into a large containing
   tensor.
   Warning:
     Currently, only unbatched (3D) or batched (4D) image-like output
     tensors are supported.
   See "torch.nn.Fold" for details
   Return type:
      Tensor


torch.autograd.graph.Node.register_hookabstract Node.register_hook(fn)
   Registers a backward hook.
   The hook will be called every time a gradient with respect to the
   Node is computed. The hook should have the following signature:
      hook(grad_inputs: Tuple[Tensor], grad_outputs: Tuple[Tensor]) -> Tuple[Tensor] or None
   The hook should not modify its argument, but it can optionally
   return a new gradient which will be used in place of
   "grad_outputs".
   This function returns a handle with a method "handle.remove()" that
   removes the hook from the module.
   Note:
     See Backward Hooks execution for more information on how when
     this hook is executed, and how its execution is ordered relative
     to other hooks.
   Example:
      >>> import torch
      >>> a = torch.tensor([0., 0., 0.], requires_grad=True)
      >>> b = a.clone()
      >>> assert isinstance(b.grad_fn, torch.autograd.graph.Node)


handle = b.grad_fn.register_hook(lambda gI, gO: (gO[0] * 2,))
      >>> b.sum().backward(retain_graph=True)
      >>> print(a.grad)
      tensor([2., 2., 2.])
      >>> handle.remove() # Removes the hook
      >>> a.grad = None
      >>> b.sum().backward(retain_graph=True)
      >>> print(a.grad)
      tensor([1., 1., 1.])
   Return type:
      RemovableHandle


torch.arccostorch.arccos(input, *, out=None) -> Tensor
   Alias for "torch.acos()".


torch.histctorch.histc(input, bins=100, min=0, max=0, , out=None) -> Tensor
   Computes the histogram of a tensor.
   The elements are sorted into equal width bins between "min" and
   "max". If "min" and "max" are both zero, the minimum and maximum
   values of the data are used.
   Elements lower than min and higher than max and "NaN" elements are
   ignored.
   Parameters:
      * input (Tensor) -- the input tensor.
      * bins (int) -- number of histogram bins
      * min (Scalar) -- lower end of the range (inclusive)
      * max (Scalar) -- upper end of the range (inclusive)
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Returns:
      Histogram represented as a tensor
   Return type:
      Tensor
   Example:
      >>> torch.histc(torch.tensor([1., 2, 1]), bins=4, min=0, max=3)
      tensor([ 0.,  2.,  1.,  0.])


torch.Tensor.float_powerTensor.float_power(exponent) -> Tensor
   See "torch.float_power()"


torch.linalg.tensorsolvetorch.linalg.tensorsolve(A, B, dims=None, , out=None) -> Tensor
   Computes the solution X to the system torch.tensordot(A, X) =
   B.
   If m is the product of the first "B".ndim  dimensions of "A"
   and n is the product of the rest of the dimensions, this function
   expects m and n to be equal.
   The returned tensor x satisfies tensordot("A", x, dims=x.ndim)
   == "B". x has shape "A"[B.ndim:].
   If "dims" is specified, "A" will be reshaped as
      A = movedim(A, dims, range(len(dims) - A.ndim + 1, 0))
   Supports inputs of float, double, cfloat and cdouble dtypes.
   See also:
     "torch.linalg.tensorinv()" computes the multiplicative inverse of
     "torch.tensordot()".
   Parameters:
      * A (Tensor) -- tensor to solve for. Its shape must
        satisfy prod("A".shape[:"B".ndim]) ==
        prod("A".shape["B".ndim:]).
      * B (Tensor) -- tensor of shape "A".shape[:"B".ndim]*.


dims (Tuple[int], optional) -- dimensions of
        "A" to be moved. If None, no dimensions are moved. Default:
        None.
   Keyword Arguments:
      out (Tensor, optional) -- output tensor. Ignored if
      None. Default: None.
   Raises:
      RuntimeError -- if the reshaped "A".view(m, m) with m as
      above  is not     invertible or the product of the first "ind"
      dimensions is not equal     to the product of the rest of the
      dimensions.
   Examples:
      >>> A = torch.eye(2 * 3 * 4).reshape((2 * 3, 4, 2, 3, 4))
      >>> B = torch.randn(2 * 3, 4)
      >>> X = torch.linalg.tensorsolve(A, B)
      >>> X.shape
      torch.Size([2, 3, 4])
      >>> torch.allclose(torch.tensordot(A, X, dims=X.ndim), B)
      True
      >>> A = torch.randn(6, 4, 4, 3, 2)
      >>> B = torch.randn(4, 3, 2)
      >>> X = torch.linalg.tensorsolve(A, B, dims=(0, 2))
      >>> X.shape
      torch.Size([6, 4])
      >>> A = A.permute(1, 3, 4, 0, 2)


A = A.permute(1, 3, 4, 0, 2)
      >>> A.shape[B.ndim:]
      torch.Size([6, 4])
      >>> torch.allclose(torch.tensordot(A, X, dims=X.ndim), B, atol=1e-6)
      True


torch.Tensor.new_fullTensor.new_full(size, fill_value, , dtype=None, device=None, requires_grad=False, layout=torch.strided, pin_memory=False) -> Tensor
   Returns a Tensor of size "size" filled with "fill_value". By
   default, the returned Tensor has the same "torch.dtype" and
   "torch.device" as this tensor.
   Parameters:
      fill_value (scalar) -- the number to fill the output
      tensor with.
   Keyword Arguments:
      * dtype ("torch.dtype", optional) -- the desired type of
        returned tensor. Default: if None, same "torch.dtype" as this
        tensor.
      * device ("torch.device", optional) -- the desired device of
        returned tensor. Default: if None, same "torch.device" as this
        tensor.
      * requires_grad (bool, optional) -- If autograd should
        record operations on the returned tensor. Default: "False".
      * layout* ("torch.layout", optional) -- the desired layout of


returned Tensor. Default: "torch.strided".
      * pin_memory (bool, optional) -- If set, returned
        tensor would be allocated in the pinned memory. Works only for
        CPU tensors. Default: "False".
   Example:
      >>> tensor = torch.ones((2,), dtype=torch.float64)
      >>> tensor.new_full((3, 4), 3.141592)
      tensor([[ 3.1416,  3.1416,  3.1416,  3.1416],
              [ 3.1416,  3.1416,  3.1416,  3.1416],
              [ 3.1416,  3.1416,  3.1416,  3.1416]], dtype=torch.float64)


torch.Tensor.powTensor.pow(exponent) -> Tensor
   See "torch.pow()"


torch.Tensor.int_reprTensor.int_repr() -> Tensor
   Given a quantized Tensor, "self.int_repr()" returns a CPU Tensor
   with uint8_t as data type that stores the underlying uint8_t values
   of the given Tensor.


torch.Tensor.addcmul_Tensor.addcmul_(tensor1, tensor2, *, value=1) -> Tensor
   In-place version of "addcmul()"


torch.sspaddmmtorch.sspaddmm(input, mat1, mat2, , beta=1, alpha=1, out=None) -> Tensor
   Matrix multiplies a sparse tensor "mat1" with a dense tensor
   "mat2", then adds the sparse tensor "input" to the result.
   Note: This function is equivalent to "torch.addmm()", except
   "input" and "mat1" are sparse.
   Parameters:
      * input (Tensor) -- a sparse matrix to be added
      * mat1 (Tensor) -- a sparse matrix to be matrix multiplied
      * mat2 (Tensor) -- a dense matrix to be matrix multiplied
   Keyword Arguments:
      * beta (Number, optional) -- multiplier for "mat"
        (\beta)
      * alpha (Number, optional) -- multiplier for mat1 @
        mat2 (\alpha)
      * out (Tensor, optional*) -- the output tensor.


torch.Tensor.arctan_Tensor.arctan_() -> Tensor
   In-place version of "arctan()"


torch.Tensor.digamma_Tensor.digamma_() -> Tensor
   In-place version of "digamma()"


ParameterListclass torch.nn.ParameterList(values=None)
   Holds parameters in a list.
   "ParameterList" can be used like a regular Python list, but Tensors
   that are "Parameter" are properly registered, and will be visible
   by all "Module" methods.
   Note that the constructor, assigning an element of the list, the
   "append()" method and the "extend()" method will convert any
   "Tensor" into "Parameter".
   Parameters:
      parameters (iterable, optional) -- an iterable of
      elements to add to the list.
   Example:
      class MyModule(nn.Module):
          def init(self):
              super(MyModule, self).init()
              self.params = nn.ParameterList([nn.Parameter(torch.randn(10, 10)) for i in range(10)])
          def forward(self, x):
              # ParameterList can act as an iterable, or be indexed using ints
              for i, p in enumerate(self.params):
                  x = self.params[i // 2].mm(x) + p.mm(x)
              return x


return x
   append(value)
      Appends a given value at the end of the list.
      Parameters:
         value (Any) -- value to append
      Return type:
         ParameterList
   extend(values)
      Appends values from a Python iterable to the end of the list.
      Parameters:
         values (iterable) -- iterable of values to append
      Return type:
         ParameterList