repro.
  The repro directory will contain the following files:

     dir
     âââ test_<name>
     â   âââ model.onnx
     â   âââ test_data_set_0
     â       âââ input_0.pb
     â       âââ input_1.pb
     â       âââ output_0.pb
     â       âââ output_1.pb

  Parameters:
     * **repro_dir** (*Optional**[**str**]*) -- The directory to
       export the repro files to. Defaults to current working
       directory if None.

     * **name** (*Optional**[**str**]*) -- An optional name for
       the test case folder: "test_{name}".

  Returns:
     The path to the exported repro directory.

  Return type:
     str

find_mismatch(options=None)
  Find all mismatches between the TorchScript IR graph and the
  exported onnx model.

  Binary searches the model graph to find the minimal subgraph
  that exhibits the mismatch. A *GraphInfo* object is created for


each subgraph, recording the test inputs and export options, as
      well as the validation results.
  Parameters:
     **options** (*Optional**[**VerificationOptions**]*) -- The
     verification options.

find_partition(id)
  Find the *GraphInfo* object with the given id.

  Return type:
     *Optional*[*GraphInfo*]

has_mismatch()
  Return True if the subgraph has output mismatch between torch
  and ONNX.

  Return type:
     bool

pretty_print_mismatch(graph=False)
  Pretty print details of the mismatch between torch and ONNX.

  Parameters:
     **graph** (*bool*) -- If True, print the ATen JIT graph and
     ONNX graph.

pretty_print_tree()
  Pretty print *GraphInfo* tree.

  Each node represents a subgraph, showing the number of nodes in
  the subgraph and a check mark if the subgraph has output
  mismatch between torch and ONNX.

  The id of the subgraph is shown under the node. The *GraphInfo*


object for any subgraph can be retrieved by calling
      graph_info.find_partition(id).
  Example:

     ==================================== Tree: =====================================
     5 X   __2 X    __1 â
     id:  |  id: 0 |  id: 00
          |        |
          |        |__1 X (aten::relu)
          |           id: 01
          |
          |__3 X    __1 â
             id: 1 |  id: 10
                   |
                   |__2 X     __1 X (aten::relu)
                      id: 11 |  id: 110
                             |
                             |__1 â
                                id: 111
     =========================== Mismatch leaf subgraphs: ===========================
     ['01', '110']
     ============================= Mismatch node kinds: =============================
     {'aten::relu': 2}

verify_export(options)
  Verify the export from TorchScript IR graph to ONNX.


Export the TorchScript IR graph to ONNX, with the inputs,
      parameters and export options recorded in this object. Then
      verify the exported ONNX graph against the original TorchScript
      IR graph under the provided verification options.
  Parameters:
     **options** (*VerificationOptions*) -- The verification
     options.

  Returns:
     The AssertionError raised during the verification. Returns
     None if no error is raised. onnx_graph: The exported ONNX
     graph in TorchScript IR format. onnx_outs: The outputs from
     running exported ONNX model under the onnx backend in
     *options*. pt_outs: The outputs from running the TorchScript
     IR graph.

  Return type:
     error


Threshold
class torch.nn.Threshold(threshold, value, inplace=False)
Thresholds each element of the input Tensor.
Threshold is defined as:
  y = \begin{cases} x, &\text{ if } x > \text{threshold} \\
  \text{value}, &\text{ otherwise } \end{cases}

Parameters:
      * threshold (float) -- The value to threshold at
  * **value** (*float*) -- The value to replace with

  * **inplace** (*bool*) -- can optionally do the operation in-
    place. Default: "False"

Shape:
      * Input: (*), where * means any number of dimensions.
  * Output: (*), same shape as the input.

Examples:
  >>> m = nn.Threshold(0.1, 20)
  >>> input = torch.randn(2)
  >>> output = m(input)


torch.addmv
torch.addmv(input, mat, vec, *, beta=1, alpha=1, out=None) -> Tensor
Performs a matrix-vector product of the matrix "mat" and the vector
   "vec". The vector "input" is added to the final result.
If "mat" is a (n \times m) tensor, "vec" is a 1-D tensor of size
   m, then "input" must be broadcastable with a 1-D tensor of size
   n and "out" will be 1-D tensor of size n.
"alpha" and "beta" are scaling factors on matrix-vector product
   between "mat" and "vec" and the added tensor "input" respectively.
  \text{out} = \beta\ \text{input} + \alpha\ (\text{mat}
  \mathbin{@} \text{vec})

If "beta" is 0, then "input" will be ignored, and nan and inf
   in it will not be propagated.
For inputs of type FloatTensor or DoubleTensor, arguments
   "beta" and "alpha" must be real numbers, otherwise they should be
   integers.
Parameters:
      * input (Tensor) -- vector to be added
  * **mat** (*Tensor*) -- matrix to be matrix multiplied


vec (Tensor) -- vector to be matrix multiplied

Keyword Arguments:
      * beta (Number, optional) -- multiplier for "input"
        (\beta)
  * **alpha** (*Number**, **optional*) -- multiplier for mat @ vec
    (\alpha)

  * **out** (*Tensor**, **optional*) -- the output tensor.

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


torch.lu_unpack
torch.lu_unpack(LU_data, LU_pivots, unpack_data=True, unpack_pivots=True, *, out=None)
Unpacks the LU decomposition returned by "lu_factor()" into the P,
   L, U matrices.
See also:
 "lu()" returns the matrices from the LU decomposition. Its
 gradient formula is more efficient than that of doing
 "lu_factor()" followed by "lu_unpack()".

Parameters:
      * LU_data (Tensor) -- the packed LU factorization data
  * **LU_pivots** (*Tensor*) -- the packed LU factorization pivots

  * **unpack_data** (*bool*) -- flag indicating if the data should
    be unpacked. If "False", then the returned "L" and "U" are
    empty tensors. Default: "True"

  * **unpack_pivots** (*bool*) -- flag indicating if the pivots
    should be unpacked into a permutation matrix "P". If "False",
    then the returned "P" is  an empty tensor. Default: "True"

Keyword Arguments:
      out (tuple, optional) -- output tuple of three


tensors. Ignored if None.
Returns:
      A namedtuple "(P, L, U)"
Examples:
  >>> A = torch.randn(2, 3, 3)
  >>> LU, pivots = torch.linalg.lu_factor(A)
  >>> P, L, U = torch.lu_unpack(LU, pivots)
  >>> # We can recover A from the factorization
  >>> A_ = P @ L @ U
  >>> torch.allclose(A, A_)
  True

  >>> # LU factorization of a rectangular matrix:
  >>> A = torch.randn(2, 3, 2)
  >>> LU, pivots = torch.linalg.lu_factor(A)
  >>> P, L, U = torch.lu_unpack(LU, pivots)
  >>> # P, L, U are the same as returned by linalg.lu
  >>> P_, L_, U_ = torch.linalg.lu(A)
  >>> torch.allclose(P, P_) and torch.allclose(L, L_) and torch.allclose(U, U_)
  True


LayerNorm
class torch.nn.LayerNorm(normalized_shape, eps=1e-05, elementwise_affine=True, device=None, dtype=None)
Applies Layer Normalization over a mini-batch of inputs as
   described in the paper Layer Normalization
  y = \frac{x - \mathrm{E}[x]}{ \sqrt{\mathrm{Var}[x] + \epsilon}}
  * \gamma + \beta

The mean and standard-deviation are calculated over the last D
   dimensions, where D is the dimension of "normalized_shape". For
   example, if "normalized_shape" is "(3, 5)" (a 2-dimensional shape),
   the mean and standard-deviation are computed over the last 2
   dimensions of the input (i.e. "input.mean((-2, -1))"). \gamma and
   \beta are learnable affine transform parameters of
   "normalized_shape" if "elementwise_affine" is "True". The standard-
   deviation is calculated via the biased estimator, equivalent to
   torch.var(input, unbiased=False).
Note:
 Unlike Batch Normalization and Instance Normalization, which


applies scalar scale and bias for each entire channel/plane with
     the "affine" option, Layer Normalization applies per-element
     scale and bias with "elementwise_affine".
This layer uses statistics computed from input data in both
   training and evaluation modes.
Parameters:
      * normalized_shape (int or list or torch.Size) --
    input shape from an expected input of size

       [* \times \text{normalized\_shape}[0] \times
       \text{normalized\_shape}[1]     \times \ldots \times
       \text{normalized\_shape}[-1]]

    If a single integer is used, it is treated as a singleton
    list, and this module will normalize over the last dimension
    which is expected to be of that specific size.

  * **eps** (*float*) -- a value added to the denominator for
    numerical stability. Default: 1e-5

  * **elementwise_affine** (*bool*) -- a boolean value that when
    set to "True", this module has learnable per-element affine


parameters initialized to ones (for weights) and zeros (for
        biases). Default: "True".
Variables:
      * weight -- the learnable weights of the module of shape
        \text{normalized_shape} when "elementwise_affine" is set to
        "True". The values are initialized to 1.
  * **bias** -- the learnable bias of the module of shape
    \text{normalized\_shape} when "elementwise_affine" is set to
    "True". The values are initialized to 0.

Shape:
      * Input: (N, *)
  * Output: (N, *) (same shape as input)

Examples:
  >>> # NLP Example
  >>> batch, sentence_length, embedding_dim = 20, 5, 10
  >>> embedding = torch.randn(batch, sentence_length, embedding_dim)
  >>> layer_norm = nn.LayerNorm(embedding_dim)
  >>> # Activate module
  >>> layer_norm(embedding)
  >>>
  >>> # Image Example
  >>> N, C, H, W = 20, 5, 10, 10
  >>> input = torch.randn(N, C, H, W)


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

[image]


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

Please see the forward-mode AD tutorial for detailed steps on how
   to use this API.


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

-[ Examples ]-

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


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


torch.fft.ihfft2
torch.fft.ihfft2(input, s=None, dim=(- 2, - 1), norm=None, *, out=None) -> Tensor
Computes the 2-dimensional inverse discrete Fourier transform of
   real "input". Equivalent to "ihfftn()" but transforms only the two
   last dimensions by default.
Note:
 Supports torch.half on CUDA with GPU Architecture SM53 or
 greater. However it only supports powers of 2 signal length in
 every transformed dimensions.

Parameters:
      * input (Tensor) -- the input tensor
  * **s** (*Tuple**[**int**]**, **optional*) -- Signal size in the
    transformed dimensions. If given, each dimension "dim[i]" will
    either be zero-padded or trimmed to the length "s[i]" before
    computing the Hermitian IFFT. If a length "-1" is specified,
    no padding is done in that dimension. Default: "s =
    [input.size(d) for d in dim]"

  * **dim** (*Tuple**[**int**]**, **optional*) -- Dimensions to be


transformed. Default: last two dimensions.
  * **norm** (*str**, **optional*) --

    Normalization mode. For the backward transform ("ihfft2()"),
    these correspond to:

    * ""forward"" - no normalization

    * ""backward"" - normalize by "1/n"

    * ""ortho"" - normalize by "1/sqrt(n)" (making the Hermitian
      IFFT orthonormal)

    Where "n = prod(s)" is the logical IFFT size. Calling the
    forward transform ("hfft2()") with the same normalization mode
    will apply an overall normalization of "1/n" between the two
    transforms. This is required to make "ihfft2()" the exact
    inverse.

    Default is ""backward"" (normalize by "1/n").

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
-[ Example ]-

T = torch.rand(10, 10)
t = torch.fft.ihfft2(t)
t.size()
   torch.Size([10, 6])

Compared against the full output from "ifft2()", the Hermitian


time-space signal takes up only half the space.

fftn = torch.fft.ifft2(t)
torch.allclose(fftn[..., :6], rfftn)
   True

The discrete Fourier transform is separable, so "ihfft2()" here is
   equivalent to a combination of "ifft()" and "ihfft()":

two_ffts = torch.fft.ifft(torch.fft.ihfft(t, dim=1), dim=0)
torch.allclose(t, two_ffts)
   True


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


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


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


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

  * **stride** (*int** or **tuple**, **optional*) -- Stride of the
    convolution. Default: 1

  * **padding** (*int** or **tuple**, **optional*) -- Zero-padding
    added to both sides of the input. Default: 0

  * **padding_mode** (*str**, **optional*) -- "'zeros'",


"'reflect'", "'replicate'" or "'circular'". Default: "'zeros'"
  * **dilation** (*int** or **tuple**, **optional*) -- Spacing
    between kernel elements. Default: 1

  * **groups** (*int**, **optional*) -- Number of blocked
    connections from input channels to output channels. Default: 1

  * **bias** (*bool**, **optional*) -- If "True", adds a learnable
    bias to the output. Default: "True"

See also:
 "torch.nn.Conv1d" and "torch.nn.modules.lazy.LazyModuleMixin"

cls_to_become
  alias of "Conv1d"


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


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

  * **dtype** ("torch.dtype", optional) -- the desired data type
    of returned tensor.  If specified, the input tensor is casted
    to "dtype" before the operation is performed. This is useful
    for preventing data type overflows. Default: None


L1Loss
class torch.nn.L1Loss(size_average=None, reduce=None, reduction='mean')
Creates a criterion that measures the mean absolute error (MAE)
   between each element in the input x and target y.
The unreduced (i.e. with "reduction" set to "'none'") loss can be
   described as:
  \ell(x, y) = L = \{l_1,\dots,l_N\}^\top, \quad l_n = \left| x_n
  - y_n \right|,

where N is the batch size. If "reduction" is not "'none'" (default
   "'mean'"), then:
  \ell(x, y) = \begin{cases}     \operatorname{mean}(L), &
  \text{if reduction} = \text{`mean';}\\
  \operatorname{sum}(L),  & \text{if reduction} = \text{`sum'.}
  \end{cases}

x and y are tensors of arbitrary shapes with a total of n elements
   each.
The sum operation still operates over all the elements, and divides
   by n.
The division by n can be avoided if one sets "reduction = 'sum'".
Supports real-valued and complex-valued inputs.
Parameters:


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

  * **reduction** (*str**, **optional*) -- Specifies the reduction
    to apply to the output: "'none'" | "'mean'" | "'sum'".
    "'none'": no reduction will be applied, "'mean'": the sum of


the output will be divided by the number of elements in the
        output, "'sum'": the output will be summed. Note:
        "size_average" and "reduce" are in the process of being
        deprecated, and in the meantime, specifying either of those
        two args will override "reduction". Default: "'mean'"
Shape:
      * Input: (*), where * means any number of dimensions.
  * Target: (*), same shape as the input.

  * Output: scalar. If "reduction" is "'none'", then (*), same
    shape as the input.

Examples:
  >>> loss = nn.L1Loss()
  >>> input = torch.randn(3, 5, requires_grad=True)
  >>> target = torch.randn(3, 5)
  >>> output = loss(input, target)
  >>> output.backward()


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


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


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


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


MaxPool1d
class torch.nn.MaxPool1d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
Applies a 1D max pooling over an input signal composed of several
   input planes.
In the simplest case, the output value of the layer with input size
   (N, C, L) and output (N, C, L_{out}) can be precisely described as:
  out(N_i, C_j, k) = \max_{m=0, \ldots, \text{kernel\_size} - 1}
  input(N_i, C_j, stride \times k + m)

If "padding" is non-zero, then the input is implicitly padded with
   negative infinity on both sides for "padding" number of points.
   "dilation" is the stride between the elements within the sliding
   window. This link has a nice visualization of the pooling
   parameters.
Note:
 When ceil_mode=True, sliding windows are allowed to go off-bounds
 if they start within the left padding or the input. Sliding
 windows that would start in the right padded region are ignored.

Parameters:


Parameters:
      * kernel_size (Union[int, Tuple[int]]) --
        The size of the sliding window, must be > 0.
  * **stride** (*Union**[**int**, **Tuple**[**int**]**]*) -- The
    stride of the sliding window, must be > 0. Default value is
    "kernel_size".

  * **padding** (*Union**[**int**, **Tuple**[**int**]**]*) --
    Implicit negative infinity padding to be added on both sides,
    must be >= 0 and <= kernel_size / 2.

  * **dilation** (*Union**[**int**, **Tuple**[**int**]**]*) -- The
    stride between elements within a sliding window, must be > 0.

  * **return_indices** (*bool*) -- If "True", will return the
    argmax along with the max values. Useful for
    "torch.nn.MaxUnpool1d" later

  * **ceil_mode** (*bool*) -- If "True", will use *ceil* instead
    of *floor* to compute the output shape. This ensures that
    every element in the input tensor is covered by a sliding
    window.

Shape:


window.
Shape:
      * Input: (N, C, L_{in}) or (C, L_{in}).
  * Output: (N, C, L_{out}) or (C, L_{out}), where

       L_{out} = \left\lfloor \frac{L_{in} + 2 \times
       \text{padding} - \text{dilation}       \times
       (\text{kernel\_size} - 1) - 1}{\text{stride}} +
       1\right\rfloor

Examples:
  >>> # pool of size=3, stride=2
  >>> m = nn.MaxPool1d(3, stride=2)
  >>> input = torch.randn(20, 16, 50)
  >>> output = m(input)


torch.atan2
torch.atan2(input, other, *, out=None) -> Tensor
Element-wise arctangent of \text{input}{i} / \text{other} with
   consideration of the quadrant. Returns a new tensor with the signed
   angles in radians between vector (\text{other}{i},
   \text{input}) and vector (1, 0). (Note that \text{other}{i},
   the second parameter, is the x-coordinate, while \text{input},
   the first parameter, is the y-coordinate.)
The shapes of "input" and "other" must be broadcastable.
Parameters:
      * input (Tensor) -- the first input tensor
  * **other** (*Tensor*) -- the second input tensor

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> a = torch.randn(4)
  >>> a
  tensor([ 0.9041,  0.0196, -0.3108, -2.4423])
  >>> torch.atan2(a, torch.randn(4))
  tensor([ 0.9833,  0.0811, -1.9743, -1.4151])


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


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


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


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


torch.autograd.Function.vmap
static Function.vmap(info, in_dims, *args)
Defines a rule for the behavior of this autograd.Function
   underneath "torch.vmap()". For a "torch.autograd.Function()" to
   support "torch.vmap()", you must either override this staticmethod,
   or set "generate_vmap_rule" to "True" (you may not do both).
If you choose to override this staticmethod: it must accept

an "info" object as the first argument. "info.batch_size"
     specifies the size of the dimension being vmapped over, while
     "info.randomness" is the randomness option passed to
     "torch.vmap()".

an "in_dims" tuple as the second argument. For each arg in
     "args", "in_dims" has a corresponding "Optional[int]". It is
     "None" if the arg is not a Tensor or if the arg is not being
     vmapped over, otherwise, it is an integer specifying what
     dimension of the Tensor is being vmapped over.

"*args", which is the same as the args to "forward()".


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


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

where
  d(x_i, y_i) = \left\lVert {\bf x}_i - {\bf y}_i \right\rVert_p

See also "TripletMarginWithDistanceLoss", which computes the


triplet margin loss for input tensors using a custom distance
   function.
Parameters:
      * margin (float, optional) -- Default: 1.
  * **p** (*int**, **optional*) -- The norm degree for pairwise
    distance. Default: 2.

  * **swap** (*bool**, **optional*) -- The distance swap is
    described in detail in the paper *Learning shallow
    convolutional feature descriptors with triplet losses* by V.
    Balntas, E. Riba et al. Default: "False".

  * **size_average** (*bool**, **optional*) -- Deprecated (see
    "reduction"). By default, the losses are averaged over each
    loss element in the batch. Note that for some losses, there
    are multiple elements per sample. If the field "size_average"
    is set to "False", the losses are instead summed for each
    minibatch. Ignored when "reduce" is "False". Default: "True"

  * **reduce** (*bool**, **optional*) -- Deprecated (see


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

Shape:
      * Input: (N, D) or (D) where D is the vector dimension.
  * Output: A Tensor of shape (N) if "reduction" is "'none'" and
    input shape is (N, D); a scalar otherwise.

Examples:


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


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


torch.broadcast_shapes
torch.broadcast_shapes(*shapes) -> Size
Similar to "broadcast_tensors()" but for shapes.
This is equivalent to "torch.broadcast_tensors(*map(torch.empty,
   shapes))[0].shape" but avoids the need create to intermediate
   tensors. This is useful for broadcasting tensors of common batch
   shape but different rightmost shape, e.g. to broadcast mean vectors
   with covariance matrices.
Example:
  >>> torch.broadcast_shapes((2,), (3, 1), (1, 1, 1))
  torch.Size([1, 3, 2])

Parameters:
      shapes (torch.Size*) -- Shapes of tensors.
Returns:
      A shape compatible with all input shapes.
Return type:
      shape (torch.Size)
Raises:
      RuntimeError -- If shapes are incompatible.


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

Parameters:
      * input -- input tensor of shape (\text{minibatch} ,
        \text{in_channels} , iW)


\text{in_channels} , iW)
  * **weight** -- filters of shape (\text{in\_channels} ,
    \frac{\text{out\_channels}}{\text{groups}} , kW)

  * **bias** -- optional bias of shape (\text{out\_channels}).
    Default: None

  * **stride** -- the stride of the convolving kernel. Can be a
    single number or a tuple "(sW,)". Default: 1

  * **padding** -- "dilation * (kernel_size - 1) - padding" zero-
    padding will be added to both sides of each dimension in the
    input. Can be a single number or a tuple "(padW,)". Default: 0

  * **output_padding** -- additional size added to one side of
    each dimension in the output shape. Can be a single number or
    a tuple "(out_padW)". Default: 0

  * **groups** -- split input into groups, \text{in\_channels}
    should be divisible by the number of groups. Default: 1

  * **dilation** -- the spacing between kernel elements. Can be a
    single number or a tuple "(dW,)". Default: 1


Examples:
  >>> inputs = torch.randn(20, 16, 50)
  >>> weights = torch.randn(16, 33, 5)
  >>> F.conv_transpose1d(inputs, weights)


Hardshrink
class torch.nn.Hardshrink(lambd=0.5)
Applies the Hard Shrinkage (Hardshrink) function element-wise.
Hardshrink is defined as:
  \text{HardShrink}(x) = \begin{cases} x, & \text{ if } x >
  \lambda \\ x, & \text{ if } x < -\lambda \\ 0, & \text{
  otherwise } \end{cases}

Parameters:
      lambd (float) -- the \lambda value for the Hardshrink
      formulation. Default: 0.5
Shape:
      * Input: (*), where * means any number of dimensions.
  * Output: (*), same shape as the input.

[image]
Examples:
  >>> m = nn.Hardshrink()
  >>> input = torch.randn(2)
  >>> output = m(input)


torch.dot
torch.dot(input, other, *, out=None) -> Tensor
Computes the dot product of two 1D tensors.
Note:
 Unlike NumPy's dot, torch.dot intentionally only supports
 computing the dot product of two 1D tensors with the same number
 of elements.

Parameters:
      * input (Tensor) -- first tensor in the dot product, must
        be 1D.
  * **other** (*Tensor*) -- second tensor in the dot product, must
    be 1D.

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> torch.dot(torch.tensor([2, 3]), torch.tensor([2, 1]))
  tensor(7)


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


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

Shape:
      * Input: (N, C, L_{in}) or (C, L_{in}).
  * Output: (N, C, L_{out}) or (C, L_{out}), where
    L_{out}=\text{output\_size}.

-[ Examples ]-

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


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


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


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


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

in training and evaluation. One may also wrap the parts of the
   modules that use several times the parametrized tensors. For


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


LeakyReLU
class torch.ao.nn.quantized.LeakyReLU(scale, zero_point, negative_slope=0.01, inplace=False, device=None, dtype=None)
This is the quantized equivalent of "LeakyReLU".
Parameters:
      * scale (float) -- quantization scale of the output tensor
  * **zero_point** (*int*) -- quantization zero point of the
    output tensor

  * **negative_slope** (*float*) -- Controls the angle of the
    negative slope. Default: 1e-2


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

Example:
  >>> a = torch.arange(4.)
  >>> torch.reshape(a, (2, 2))
  tensor([[ 0.,  1.],
          [ 2.,  3.]])
  >>> b = torch.tensor([[0, 1], [2, 3]])
  >>> torch.reshape(b, (-1,))
  tensor([ 0,  1,  2,  3])


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


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


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


torch.acos
torch.acos(input, *, out=None) -> Tensor
Computes the inverse cosine of each element in "input".
  \text{out}_{i} = \cos^{-1}(\text{input}_{i})

Parameters:
      input (Tensor) -- the input tensor.
Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> a = torch.randn(4)
  >>> a
  tensor([ 0.3348, -0.5889,  0.2005, -0.1584])
  >>> torch.acos(a)
  tensor([ 1.2294,  2.2004,  1.3690,  1.7298])


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


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


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


Dropout1d
class torch.nn.Dropout1d(p=0.5, inplace=False)
Randomly zero out entire channels (a channel is a 1D feature map,
   e.g., the j-th channel of the i-th sample in the batched input is a
   1D tensor \text{input}[i, j]). Each channel will be zeroed out
   independently on every forward call with probability "p" using
   samples from a Bernoulli distribution.
Usually the input comes from "nn.Conv1d" modules.
As described in the paper Efficient Object Localization Using
   Convolutional Networks , if adjacent pixels within feature maps are
   strongly correlated (as is normally the case in early convolution
   layers) then i.i.d. dropout will not regularize the activations and
   will otherwise just result in an effective learning rate decrease.
In this case, "nn.Dropout1d()" will help promote independence
   between feature maps and should be used instead.
Parameters:
      * p (float, optional) -- probability of an element to
        be zero-ed.


be zero-ed.
  * **inplace** (*bool**, **optional*) -- If set to "True", will
    do this operation in-place

Shape:
      * Input: (N, C, L) or (C, L).
  * Output: (N, C, L) or (C, L) (same shape as input).

Examples:
  >>> m = nn.Dropout1d(p=0.2)
  >>> input = torch.randn(20, 16, 32)
  >>> output = m(input)


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


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


MultiplicativeLR
class torch.optim.lr_scheduler.MultiplicativeLR(optimizer, lr_lambda, last_epoch=- 1, verbose=False)
Multiply the learning rate of each parameter group by the factor
   given in the specified function. When last_epoch=-1, sets initial
   lr as lr.
Parameters:
      * optimizer (Optimizer) -- Wrapped optimizer.
  * **lr_lambda** (*function** or **list*) -- A function which
    computes a multiplicative factor given an integer parameter
    epoch, or a list of such functions, one for each group in
    optimizer.param_groups.

  * **last_epoch** (*int*) -- The index of last epoch. Default:
    -1.

  * **verbose** (*bool*) -- If "True", prints a message to stdout
    for each update. Default: "False".

-[ Example ]-

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


scheduler.step()

get_last_lr()
  Return last computed learning rate by current scheduler.

load_state_dict(state_dict)
  Loads the schedulers state.

  Parameters:
     **state_dict** (*dict*) -- scheduler state. Should be an
     object returned from a call to "state_dict()".

print_lr(is_verbose, group, lr, epoch=None)
  Display the current learning rate.

state_dict()
  Returns the state of the scheduler as a "dict".

  It contains an entry for every variable in self.__dict__ which
  is not the optimizer. The learning rate lambda functions will
  only be saved if they are callable objects and not if they are
  functions or lambdas.


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


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


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


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

  * **padding_idx** (*int**, **optional*) -- If specified, the
    entries at "padding_idx" do not contribute to the gradient;


therefore, the embedding vector at "padding_idx" is not
        updated during training, i.e. it remains as a fixed "pad".
  * **max_norm** (*float**, **optional*) -- If given, each
    embedding vector with norm larger than "max_norm" is
    renormalized to have norm "max_norm". Note: this will modify
    "weight" in-place.

  * **norm_type** (*float**, **optional*) -- The p of the p-norm
    to compute for the "max_norm" option. Default "2".

  * **scale_grad_by_freq** (*bool**, **optional*) -- If given,
    this will scale gradients by the inverse of frequency of the
    words in the mini-batch. Default "False".

  * **sparse** (*bool**, **optional*) -- If "True", gradient
    w.r.t. "weight" will be a sparse tensor. See Notes under
    "torch.nn.Embedding" for more details regarding sparse
    gradients.

Return type:
      Tensor
Shape:
      * Input: LongTensor of arbitrary shape containing the indices to
        extract


extract
  * Weight: Embedding matrix of floating point type with shape
    *(V, embedding_dim)*, where V = maximum index + 1 and
    embedding_dim = the embedding size

  * Output: *(*, embedding_dim)*, where *** is the input shape

Examples:
  >>> # a batch of 2 samples of 4 indices each
  >>> input = torch.tensor([[1, 2, 4, 5], [4, 3, 2, 9]])
  >>> # an embedding matrix containing 10 tensors of size 3
  >>> embedding_matrix = torch.rand(10, 3)
  >>> F.embedding(input, embedding_matrix)
  tensor([[[ 0.8490,  0.9625,  0.6753],
           [ 0.9666,  0.7761,  0.6108],
           [ 0.6246,  0.9751,  0.3618],
           [ 0.4161,  0.2419,  0.7383]],

          [[ 0.6246,  0.9751,  0.3618],
           [ 0.0237,  0.7794,  0.0528],
           [ 0.9666,  0.7761,  0.6108],
           [ 0.3385,  0.8612,  0.1867]]])

  >>> # example with padding_idx
  >>> weights = torch.rand(10, 3)
  >>> weights[0, :].zero_()


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


torch.fft.hfft
torch.fft.hfft(input, n=None, dim=- 1, norm=None, *, out=None) -> Tensor
Computes the one dimensional discrete Fourier transform of a
   Hermitian symmetric "input" signal.
Note:
 "hfft()"/"ihfft()" are analogous to "rfft()"/"irfft()". The real
 FFT expects a real signal in the time-domain and gives a
 Hermitian symmetry in the frequency-domain. The Hermitian FFT is
 the opposite; Hermitian symmetric in the time-domain and real-
 valued in the frequency-domain. For this reason, special care
 needs to be taken with the length argument "n", in the same way
 as with "irfft()".

Note:
 Because the signal is Hermitian in the time-domain, the result
 will be real in the frequency domain. Note that some input
 frequencies must be real-valued to satisfy the Hermitian
 property. In these cases the imaginary component will be ignored.
 For example, any imaginary component in "input[0]" would result


in one or more complex frequency terms which cannot be
     represented in a real output and so will always be ignored.
Note:
 The correct interpretation of the Hermitian input depends on the
 length of the original data, as given by "n". This is because
 each input shape could correspond to either an odd or even length
 signal. By default, the signal is assumed to be even length and
 odd signals will not round-trip properly. So, it is recommended
 to always pass the signal length "n".

Note:
 Supports torch.half and torch.chalf on CUDA with GPU Architecture
 SM53 or greater. However it only supports powers of 2 signal
 length in every transformed dimension. With default arguments,
 size of the transformed dimension should be (2^n + 1) as argument
 *n* defaults to even output size = 2 * (transformed_dim_size - 1)

Parameters:
      * input (Tensor) -- the input tensor representing a half-
        Hermitian signal


Hermitian signal
  * **n** (*int**, **optional*) -- Output signal length. This
    determines the length of the real output. If given, the input
    will either be zero-padded or trimmed to this length before
    computing the Hermitian FFT. Defaults to even output:
    "n=2*(input.size(dim) - 1)".

  * **dim** (*int**, **optional*) -- The dimension along which to
    take the one dimensional Hermitian FFT.

  * **norm** (*str**, **optional*) --

    Normalization mode. For the forward transform ("hfft()"),
    these correspond to:

    * ""forward"" - normalize by "1/n"

    * ""backward"" - no normalization

    * ""ortho"" - normalize by "1/sqrt(n)" (making the Hermitian
      FFT orthonormal)

    Calling the backward transform ("ihfft()") with the same
    normalization mode will apply an overall normalization of
    "1/n" between the two transforms. This is required to make
    "ihfft()" the exact inverse.


"ihfft()" the exact inverse.
    Default is ""backward"" (no normalization).

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
-[ Example ]-
Taking a real-valued frequency signal and bringing it into the time
   domain gives Hermitian symmetric output:

t = torch.linspace(0, 1, 5)
t
   tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])
T = torch.fft.ifft(t)
T
   tensor([ 0.5000-0.0000j, -0.1250-0.1720j, -0.1250-0.0406j, -0.1250+0.0406j,
           -0.1250+0.1720j])

Note that "T[1] == T[-1].conj()" and "T[2] == T[-2].conj()" is
   redundant. We can thus compute the forward transform without
   considering negative frequencies:

torch.fft.hfft(T[:3], n=5)
   tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])

Like with "irfft()", the output length must be given in order to
   recover an even length output:

torch.fft.hfft(T[:3])
   tensor([0.1250, 0.2809, 0.6250, 0.9691])


UpsamplingNearest2d
class torch.nn.UpsamplingNearest2d(size=None, scale_factor=None)
Applies a 2D nearest neighbor upsampling to an input signal
   composed of several input channels.
To specify the scale, it takes either the "size" or the
   "scale_factor" as it's constructor argument.
When "size" is given, it is the output size of the image (h, w).
Parameters:
      * size (int or Tuple[int, int],
        optional) -- output spatial sizes
  * **scale_factor** (*float** or **Tuple**[**float**,
    **float**]**, **optional*) -- multiplier for spatial size.

Warning:
 This class is deprecated in favor of "interpolate()".

Shape:
      * Input: (N, C, H_{in}, W_{in})
  * Output: (N, C, H_{out}, W_{out}) where

  H_{out} = \left\lfloor H_{in} \times \text{scale\_factor}
  \right\rfloor

  W_{out} = \left\lfloor W_{in} \times \text{scale\_factor}
  \right\rfloor

Examples:


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

  >>> m = nn.UpsamplingNearest2d(scale_factor=2)
  >>> m(input)
  tensor([[[[1., 1., 2., 2.],
            [1., 1., 2., 2.],
            [3., 3., 4., 4.],
            [3., 3., 4., 4.]]]])


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


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


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


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

    Either:

    * A dictionary that maps from name or type of submodule to
      quantization configuration, qconfig applies to all
      submodules of a given module unless qconfig for the


submodules are specified (when the submodule already has
          qconfig attribute). Entries in the dictionary need to be
          QConfig instances.
    * A set of types and/or submodule names to apply dynamic
      quantization to, in which case the *dtype* argument is used
      to specify the bit-width

  * **inplace** -- carry out model transformations in-place, the
    original module is mutated

  * **mapping** -- maps type of a submodule to a type of
    corresponding dynamically quantized version with which the
    submodule needs to be replaced


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


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


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

"stride" controls the stride for the cross-correlation.

"padding" controls the amount of implicit zero padding on both


sides for "dilation * (kernel_size - 1) - padding" number of
     points. See note below for details.

"output_padding" controls the additional size added to one side
     of the output shape. See note below for details.

"dilation" controls the spacing between the kernel points; also
     known as the Ã  trous algorithm. It is harder to describe, but the
     link here has a nice visualization of what "dilation" does.

"groups" controls the connections between inputs and outputs.
     "in_channels" and "out_channels" must both be divisible by
     "groups". For example,
* At groups=1, all inputs are convolved to all outputs.

* At groups=2, the operation becomes equivalent to having two
  conv layers side by side, each seeing half the input
  channels and producing half the output channels, and both
  subsequently concatenated.

* At groups= "in_channels", each input channel is convolved
  with its own set of filters (of size


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

Note:
 In some circumstances when using the CUDA backend with CuDNN,
 this operator may select a nondeterministic algorithm to increase
 performance. If this is undesirable, you can try to make the


operation deterministic (potentially at a performance cost) by
     setting "torch.backends.cudnn.deterministic = True". Please see
     the notes on Reproducibility for background.
Parameters:
      * in_channels (int) -- Number of channels in the input
        image
  * **out_channels** (*int*) -- Number of channels produced by the
    convolution

  * **kernel_size** (*int** or **tuple*) -- Size of the convolving
    kernel

  * **stride** (*int** or **tuple**, **optional*) -- Stride of the
    convolution. Default: 1

  * **padding** (*int** or **tuple**, **optional*) -- "dilation *
    (kernel_size - 1) - padding" zero-padding will be added to
    both sides of the input. Default: 0

  * **output_padding** (*int** or **tuple**, **optional*) --
    Additional size added to one side of the output shape.
    Default: 0

  * **groups** (*int**, **optional*) -- Number of blocked


connections from input channels to output channels. Default: 1
  * **bias** (*bool**, **optional*) -- If "True", adds a learnable
    bias to the output. Default: "True"

  * **dilation** (*int** or **tuple**, **optional*) -- Spacing
    between kernel elements. Default: 1

Shape:
      * Input: (N, C_{in}, L_{in}) or (C_{in}, L_{in})
  * Output: (N, C_{out}, L_{out}) or (C_{out}, L_{out}), where

       L_{out} = (L_{in} - 1) \times \text{stride} - 2 \times
       \text{padding} + \text{dilation}           \times
       (\text{kernel\_size} - 1) + \text{output\_padding} + 1

Variables:
      * weight (Tensor) -- the learnable weights of the module
        of shape (\text{in_channels},
        \frac{\text{out_channels}}{\text{groups}},
        \text{kernel_size}). The values of these weights are sampled
        from \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
        \frac{groups}{C_\text{out} * \text{kernel_size}}


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


torch.hypot
torch.hypot(input, other, *, out=None) -> Tensor
Given the legs of a right triangle, return its hypotenuse.
  \text{out}_{i} = \sqrt{\text{input}_{i}^{2} +
  \text{other}_{i}^{2}}

The shapes of "input" and "other" must be broadcastable.
Parameters:
      * input (Tensor) -- the first input tensor
  * **other** (*Tensor*) -- the second input tensor

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> a = torch.hypot(torch.tensor([4.0]), torch.tensor([3.0, 4.0, 5.0]))
  tensor([5.0000, 5.6569, 6.4031])


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


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


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

Example:
  >>> dense = torch.randn(10, 10)
  >>> sparse = dense.to_sparse_csr()


sparse = dense.to_sparse_csr()
      >>> sparse_bsc = sparse.to_sparse_bsc((5, 5))
      >>> sparse_bsc.row_indices()
      tensor([0, 1, 0, 1])

  >>> dense = torch.zeros(4, 3, 1)
  >>> dense[0:2, 0] = dense[0:2, 2] = dense[2:4, 1] = 1
  >>> dense.to_sparse_bsc((2, 1), 1)
  tensor(ccol_indices=tensor([0, 1, 2, 3]),
         row_indices=tensor([0, 1, 0]),
         values=tensor([[[[1.]],

                         [[1.]]],

                        [[[1.]],

                         [[1.]]],

                        [[[1.]],

                         [[1.]]]]), size=(4, 3, 1), nnz=3,
         layout=torch.sparse_bsc)


torch.bartlett_window
torch.bartlett_window(window_length, periodic=True, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
Bartlett window function.
  w[n] = 1 - \left| \frac{2n}{N-1} - 1 \right| = \begin{cases}
  \frac{2n}{N - 1} & \text{if } 0 \leq n \leq \frac{N - 1}{2} \\
  2 - \frac{2n}{N - 1} & \text{if } \frac{N - 1}{2} < n < N \\
  \end{cases},

where N is the full window size.
The input "window_length" is a positive integer controlling the
   returned window size. "periodic" flag determines whether the
   returned window trims off the last duplicate value from the
   symmetric window and is ready to be used as a periodic window with
   functions like "torch.stft()". Therefore, if "periodic" is true,
   the N in above formula is in fact \text{window_length} + 1. Also,
   we always have "torch.bartlett_window(L, periodic=True)" equal to
   "torch.bartlett_window(L + 1, periodic=False)[:-1])".
Note:


Note:
 If "window_length" =1, the returned window contains a single
 value 1.

Parameters:
      * window_length (int) -- the size of returned window
  * **periodic** (*bool**, **optional*) -- If True, returns a
    window to be used as periodic function. If False, return a
    symmetric window.

Keyword Arguments:
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default
        (see "torch.set_default_tensor_type()"). Only floating point
        types are supported.
  * **layout** ("torch.layout", optional) -- the desired layout of
    returned window tensor. Only "torch.strided" (dense layout) is
    supported.

  * **device** ("torch.device", optional) -- the desired device of
    returned tensor. Default: if "None", uses the current device
    for the default tensor type (see
    "torch.set_default_tensor_type()"). "device" will be the CPU


for CPU tensor types and the current CUDA device for CUDA
        tensor types.
  * **requires_grad** (*bool**, **optional*) -- If autograd should
    record operations on the returned tensor. Default: "False".

Returns:
      A 1-D tensor of size (\text{window_length},) containing the
      window
Return type:
      Tensor


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


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


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


BasePruningMethod
class torch.nn.utils.prune.BasePruningMethod
Abstract base class for creation of new pruning techniques.
Provides a skeleton for customization requiring the overriding of
   methods such as "compute_mask()" and "apply()".
classmethod apply(module, name, args, importance_scores=None, *kwargs)
  Adds the forward pre-hook that enables pruning on the fly and
  the reparametrization of a tensor in terms of the original
  tensor and the pruning mask.

  Parameters:
     * **module** (*nn.Module*) -- module containing the tensor to
       prune

     * **name** (*str*) -- parameter name within "module" on which
       pruning will act.

     * **args** -- arguments passed on to a subclass of
       "BasePruningMethod"

     * **importance_scores** (*torch.Tensor*) -- tensor of
       importance scores (of same shape as module parameter) used
       to compute mask for pruning. The values in this tensor


indicate the importance of the corresponding elements in
           the parameter being pruned. If unspecified or None, the
           parameter will be used in its place.
     * **kwargs** -- keyword arguments passed on to a subclass of
       a "BasePruningMethod"

apply_mask(module)
  Simply handles the multiplication between the parameter being
  pruned and the generated mask. Fetches the mask and the original
  tensor from the module and returns the pruned version of the
  tensor.

  Parameters:
     **module** (*nn.Module*) -- module containing the tensor to
     prune

  Returns:
     pruned version of the input tensor

  Return type:
     pruned_tensor (torch.Tensor)

abstract compute_mask(t, default_mask)
  Computes and returns a mask for the input tensor "t". Starting
  from a base "default_mask" (which should be a mask of ones if
  the tensor has not been pruned yet), generate a random mask to


apply on top of the "default_mask" according to the specific
      pruning method recipe.
  Parameters:
     * **t** (*torch.Tensor*) -- tensor representing the
       importance scores of the

     * **prune.** (*parameter to*) --

     * **default_mask** (*torch.Tensor*) -- Base mask from
       previous pruning

     * **iterations** --

     * **is** (*that need to be respected after the new mask*) --

     * **t.** (*applied. Same dims as*) --

  Returns:
     mask to apply to "t", of same dims as "t"

  Return type:
     mask (torch.Tensor)

prune(t, default_mask=None, importance_scores=None)
  Computes and returns a pruned version of input tensor "t"
  according to the pruning rule specified in "compute_mask()".

  Parameters:
     * **t** (*torch.Tensor*) -- tensor to prune (of same
       dimensions as "default_mask").

     * **importance_scores** (*torch.Tensor*) -- tensor of


importance scores (of same shape as "t") used to compute
           mask for pruning "t". The values in this tensor indicate
           the importance of the corresponding elements in the "t"
           that is being pruned. If unspecified or None, the tensor
           "t" will be used in its place.
     * **default_mask** (*torch.Tensor**, **optional*) -- mask
       from previous pruning iteration, if any. To be considered
       when determining what portion of the tensor that pruning
       should act on. If None, default to a mask of ones.

  Returns:
     pruned version of tensor "t".

remove(module)
  Removes the pruning reparameterization from a module. The pruned
  parameter named "name" remains permanently pruned, and the
  parameter named "name+'_orig'" is removed from the parameter
  list. Similarly, the buffer named "name+'_mask'" is removed from
  the buffers.

  Note:

    Pruning itself is NOT undone or reversed!


torch.Tensor.triangular_solve
Tensor.triangular_solve(A, upper=True, transpose=False, unitriangular=False)
See "torch.triangular_solve()"


torch.Tensor.addcdiv_
Tensor.addcdiv_(tensor1, tensor2, *, value=1) -> Tensor
In-place version of "addcdiv()"


LinearReLU
class torch.ao.nn.intrinsic.LinearReLU(linear, relu)
This is a sequential container which calls the Linear and ReLU
   modules. During quantization this will be replaced with the
   corresponding fused module.


torch.logspace
torch.logspace(start, end, steps, base=10.0, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
Creates a one-dimensional tensor of size "steps" whose values are
   evenly spaced from {{\text{{base}}}}^{{\text{{start}}}} to
   {{\text{{base}}}}^{{\text{{end}}}}, inclusive, on a logarithmic
   scale with base "base". That is, the values are:
  (\text{base}^{\text{start}}, \text{base}^{(\text{start} +
  \frac{\text{end} - \text{start}}{ \text{steps} - 1})}, \ldots,
  \text{base}^{(\text{start} + (\text{steps} - 2) *
  \frac{\text{end} - \text{start}}{ \text{steps} - 1})},
  \text{base}^{\text{end}})

From PyTorch 1.11 logspace requires the steps argument. Use
   steps=100 to restore the previous behavior.
Parameters:
      * start (float) -- the starting value for the set of
        points
  * **end** (*float*) -- the ending value for the set of points


steps (int) -- size of the constructed tensor

base (float, optional) -- base of the logarithm
    function. Default: "10.0".

Keyword Arguments:
      * out (Tensor, optional) -- the output tensor.
  * **dtype** (*torch.dtype**, **optional*) -- the data type to
    perform the computation in. Default: if None, uses the global
    default dtype (see torch.get_default_dtype()) when both
    "start" and "end" are real, and corresponding complex dtype
    when either is complex.

  * **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.


tensor types.
  * **requires_grad** (*bool**, **optional*) -- If autograd should
    record operations on the returned tensor. Default: "False".

Example:
  >>> torch.logspace(start=-10, end=10, steps=5)
  tensor([ 1.0000e-10,  1.0000e-05,  1.0000e+00,  1.0000e+05,  1.0000e+10])
  >>> torch.logspace(start=0.1, end=1.0, steps=5)
  tensor([  1.2589,   2.1135,   3.5481,   5.9566,  10.0000])
  >>> torch.logspace(start=0.1, end=1.0, steps=1)
  tensor([1.2589])
  >>> torch.logspace(start=2, end=2, steps=1, base=2)
  tensor([4.0])


max_pool2d
class torch.ao.nn.quantized.functional.max_pool2d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False)
Applies a 2D max pooling over a quantized input signal composed of
   several quantized input planes.
Note:
 The input quantization parameters are propagated to the output.

See "MaxPool2d" for details.


torch.signal.windows.hamming
torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False)
Computes the Hamming window.
The Hamming window is defined as follows:
  w_n = \alpha - \beta\ \cos \left( \frac{2 \pi n}{M - 1} \right)

The window is normalized to 1 (maximum value is 1). However, the 1
   doesn't appear if "M" is even and "sym" is True.
Parameters:
      M (int) -- the length of the window. In other words, the
      number of points of the returned window.
Keyword Arguments:
      * sym (bool, optional) -- If False, returns a
        periodic window suitable for use in spectral analysis. If
        True, returns a symmetric window suitable for use in filter
        design. Default: True.
  * **alpha** (*float**, **optional*) -- The coefficient \alpha in
    the equation above.

  * **beta** (*float**, **optional*) -- The coefficient \beta in


the equation above.
  * **dtype** ("torch.dtype", optional) -- the desired data type
    of returned tensor. Default: if "None", uses a global default
    (see "torch.set_default_tensor_type()").

  * **layout** ("torch.layout", optional) -- the desired layout of
    returned Tensor. Default: "torch.strided".

  * **device** ("torch.device", optional) -- the desired device of
    returned tensor. Default: if "None", uses the current device
    for the default tensor type (see
    "torch.set_default_tensor_type()"). "device" will be the CPU
    for CPU tensor types and the current CUDA device for CUDA
    tensor types.

  * **requires_grad** (*bool**, **optional*) -- If autograd should
    record operations on the returned tensor. Default: "False".

Return type:
      Tensor
Examples:
  >>> # Generates a symmetric Hamming window.
  >>> torch.signal.windows.hamming(10)


torch.signal.windows.hamming(10)
      tensor([0.0800, 0.1876, 0.4601, 0.7700, 0.9723, 0.9723, 0.7700, 0.4601, 0.1876, 0.0800])

  >>> # Generates a periodic Hamming window.
  >>> torch.signal.windows.hamming(10, sym=False)
  tensor([0.0800, 0.1679, 0.3979, 0.6821, 0.9121, 1.0000, 0.9121, 0.6821, 0.3979, 0.1679])


torch.fft.fftn
torch.fft.fftn(input, s=None, dim=None, norm=None, *, out=None) -> Tensor
Computes the N dimensional discrete Fourier transform of "input".
Note:
 The Fourier domain representation of any real signal satisfies
 the Hermitian property: "X[i_1, ..., i_n] = conj(X[-i_1, ...,
 -i_n])". This function always returns all positive and negative
 frequency terms even though, for real inputs, half of these
 values are redundant. "rfftn()" returns the more compact one-
 sided representation where only the positive frequencies of the
 last dimension are returned.

Note:
 Supports torch.half and torch.chalf on CUDA with GPU Architecture
 SM53 or greater. However it only supports powers of 2 signal
 length in every transformed dimensions.

Parameters:
      * input (Tensor) -- the input tensor
  * **s** (*Tuple**[**int**]**, **optional*) -- Signal size in the


transformed dimensions. If given, each dimension "dim[i]" will
        either be zero-padded or trimmed to the length "s[i]" before
        computing the FFT. If a length "-1" is specified, no padding
        is done in that dimension. Default: "s = [input.size(d) for d
        in dim]"
  * **dim** (*Tuple**[**int**]**, **optional*) -- Dimensions to be
    transformed. Default: all dimensions, or the last "len(s)"
    dimensions if "s" is given.

  * **norm** (*str**, **optional*) --

    Normalization mode. For the forward transform ("fftn()"),
    these correspond to:

    * ""forward"" - normalize by "1/n"

    * ""backward"" - no normalization

    * ""ortho"" - normalize by "1/sqrt(n)" (making the FFT
      orthonormal)

    Where "n = prod(s)" is the logical FFT size. Calling the
    backward transform ("ifftn()") with the same normalization
    mode will apply an overall normalization of "1/n" between the


two transforms. This is required to make "ifftn()" the exact
        inverse.
    Default is ""backward"" (no normalization).

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
-[ Example ]-

x = torch.rand(10, 10, dtype=torch.complex64)
fftn = torch.fft.fftn(x)

The discrete Fourier transform is separable, so "fftn()" here is
   equivalent to two one-dimensional "fft()" calls:

two_ffts = torch.fft.fft(torch.fft.fft(x, dim=0), dim=1)
torch.testing.assert_close(fftn, two_ffts, check_stride=False)


torch.atanh
torch.atanh(input, *, out=None) -> Tensor
Returns a new tensor with the inverse hyperbolic tangent of the
   elements of "input".
Note:
 The domain of the inverse hyperbolic tangent is *(-1, 1)* and
 values outside this range will be mapped to "NaN", except for the
 values *1* and *-1* for which the output is mapped to *+/-INF*
 respectively.

  \text{out}_{i} = \tanh^{-1}(\text{input}_{i})

Parameters:
      input (Tensor) -- the input tensor.
Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> a = torch.randn(4).uniform_(-1, 1)
  >>> a
  tensor([ -0.9385, 0.2968, -0.8591, -0.1871 ])
  >>> torch.atanh(a)
  tensor([ -1.7253, 0.3060, -1.2899, -0.1893 ])


torch.Tensor.mul_
Tensor.mul_(value) -> Tensor
In-place version of "mul()".


torch.Tensor.logical_or
Tensor.logical_or() -> Tensor
See "torch.logical_or()"


MinMaxObserver
class torch.quantization.observer.MinMaxObserver(dtype=torch.quint8, qscheme=torch.per_tensor_affine, reduce_range=False, quant_min=None, quant_max=None, factory_kwargs=None, eps=1.1920928955078125e-07)
Observer module for computing the quantization parameters based on
   the running min and max values.
This observer uses the tensor min/max statistics to compute the
   quantization parameters. The module records the running minimum and
   maximum of incoming tensors, and uses this statistic to compute the
   quantization parameters.
Parameters:
      * dtype -- dtype argument to the quantize node needed to
        implement the reference model spec.
  * **qscheme** -- Quantization scheme to be used

  * **reduce_range** -- Reduces the range of the quantized data
    type by 1 bit

  * **quant_min** -- Minimum quantization value. If unspecified,
    it will follow the 8-bit setup.


it will follow the 8-bit setup.
  * **quant_max** -- Maximum quantization value. If unspecified,
    it will follow the 8-bit setup.

  * **eps** (*Tensor*) -- Epsilon value for float32, Defaults to
    *torch.finfo(torch.float32).eps*.

Given running min/max as x_\text{min} and x_\text{max}, scale s and
   zero point z are computed as:
The running minimum/maximum x_\text{min/max} is computed as:
  \begin{array}{ll} x_\text{min} &= \begin{cases}     \min(X) &
  \text{if~}x_\text{min} = \text{None} \\
  \min\left(x_\text{min}, \min(X)\right) & \text{otherwise}
  \end{cases}\\ x_\text{max} &= \begin{cases}     \max(X) &
  \text{if~}x_\text{max} = \text{None} \\
  \max\left(x_\text{max}, \max(X)\right) & \text{otherwise}
  \end{cases}\\ \end{array}

where X is the observed tensor.
The scale s and zero point z are then computed as:
  \begin{aligned}     \text{if Symmetric:}&\\     &s = 2


\max(|x_\text{min}|, x_\text{max}) /         \left( Q_\text{max}
      - Q_\text{min} \right) \     &z = \begin{cases}         0 &
      \text{if dtype is qint8} \         128 & \text{otherwise}
      \end{cases}\     \text{Otherwise:}&\         &s = \left(
      x_\text{max} - x_\text{min}  \right ) /             \left(
      Q_\text{max} - Q_\text{min} \right ) \         &z =
      Q_\text{min} - \text{round}(x_\text{min} / s) \end{aligned}
where Q_\text{min} and Q_\text{max} are the minimum and maximum of
   the quantized data type.
Warning:
 "dtype" can only take "torch.qint8" or "torch.quint8".

Note:
 If the running minimum equals to the running maximum, the scale
 and zero_point are set to 1.0 and 0.

calculate_qparams()
  Calculates the quantization parameters.

forward(x_orig)
  Records the running minimum and maximum of "x".

reset_min_max_vals()
  Resets the min/max values.


torch.Tensor.is_floating_point
Tensor.is_floating_point() -> bool
Returns True if the data type of "self" is a floating point data
   type.


torch.cosh
torch.cosh(input, *, out=None) -> Tensor
Returns a new tensor with the hyperbolic cosine  of the elements of
   "input".
  \text{out}_{i} = \cosh(\text{input}_{i})

Parameters:
      input (Tensor) -- the input tensor.
Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> a = torch.randn(4)
  >>> a
  tensor([ 0.1632,  1.1835, -0.6979, -0.7325])
  >>> torch.cosh(a)
  tensor([ 1.0133,  1.7860,  1.2536,  1.2805])

Note:
 When "input" is on the CPU, the implementation of torch.cosh may
 use the Sleef library, which rounds very large results to
 infinity or negative infinity. See here for details.


torch.Tensor.log2_
Tensor.log2_() -> Tensor
In-place version of "log2()"


torch.msort
torch.msort(input, *, out=None) -> Tensor
Sorts the elements of the "input" tensor along its first dimension
   in ascending order by value.
Note:
 *torch.msort(t)* is equivalent to *torch.sort(t, dim=0)[0]*. See
 also "torch.sort()".

Parameters:
      input (Tensor) -- the input tensor.
Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> t = torch.randn(3, 4)
  >>> t
  tensor([[-0.1321,  0.4370, -1.2631, -1.1289],
          [-2.0527, -1.1250,  0.2275,  0.3077],
          [-0.0881, -0.1259, -0.5495,  1.0284]])
  >>> torch.msort(t)
  tensor([[-2.0527, -1.1250, -1.2631, -1.1289],
          [-0.1321, -0.1259, -0.5495,  0.3077],
          [-0.0881,  0.4370,  0.2275,  1.0284]])


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


torch.nn.functional.cosine_similarity
torch.nn.functional.cosine_similarity(x1, x2, dim=1, eps=1e-8) -> Tensor
Returns cosine similarity between "x1" and "x2", computed along
   dim. "x1" and "x2" must be broadcastable to a common shape. "dim"
   refers to the dimension in this common shape. Dimension "dim" of
   the output is squeezed (see "torch.squeeze()"), resulting in the
   output tensor having 1 fewer dimension.
  \text{similarity} = \dfrac{x_1 \cdot x_2}{\max(\Vert x_1 \Vert
  _2 \cdot \Vert x_2 \Vert _2, \epsilon)}

Supports type promotion.
Parameters:
      * x1 (Tensor) -- First input.
  * **x2** (*Tensor*) -- Second input.

  * **dim** (*int**, **optional*) -- Dimension along which cosine
    similarity is computed. Default: 1

  * **eps** (*float**, **optional*) -- Small value to avoid
    division by zero. Default: 1e-8

Example:
  >>> input1 = torch.randn(100, 128)


input1 = torch.randn(100, 128)
      >>> input2 = torch.randn(100, 128)
      >>> output = F.cosine_similarity(input1, input2)
      >>> print(output)


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


torch.Tensor.copysign_
Tensor.copysign_(other) -> Tensor
In-place version of "copysign()"


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


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


torch.signal.windows.general_cosine
torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False)
Computes the general cosine window.
The general cosine window is defined as follows:
  w_n = \sum^{M-1}_{i=0} (-1)^i a_i \cos{ \left( \frac{2 \pi i
  n}{M - 1}\right)}

The window is normalized to 1 (maximum value is 1). However, the 1
   doesn't appear if "M" is even and "sym" is True.
Parameters:
      M (int) -- the length of the window. In other words, the
      number of points of the returned window.
Keyword Arguments:
      * a (Iterable) -- the coefficients associated to each of
        the cosine functions.
  * **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*.


design. Default: True.
  * **dtype** ("torch.dtype", optional) -- the desired data type
    of returned tensor. Default: if "None", uses a global default
    (see "torch.set_default_tensor_type()").

  * **layout** ("torch.layout", optional) -- the desired layout of
    returned Tensor. Default: "torch.strided".

  * **device** ("torch.device", optional) -- the desired device of
    returned tensor. Default: if "None", uses the current device
    for the default tensor type (see
    "torch.set_default_tensor_type()"). "device" will be the CPU
    for CPU tensor types and the current CUDA device for CUDA
    tensor types.

  * **requires_grad** (*bool**, **optional*) -- If autograd should
    record operations on the returned tensor. Default: "False".

Return type:
      Tensor
Examples:
  >>> # Generates a symmetric general cosine window with 3 coefficients.


torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], sym=True)
      tensor([0.5400, 0.3376, 0.1288, 0.4200, 0.9136, 0.9136, 0.4200, 0.1288, 0.3376, 0.5400])

  >>> # Generates a periodic general cosine window wit 2 coefficients.
  >>> torch.signal.windows.general_cosine(10, a=[0.5, 1 - 0.5], sym=False)
  tensor([0.0000, 0.0955, 0.3455, 0.6545, 0.9045, 1.0000, 0.9045, 0.6545, 0.3455, 0.0955])


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


torch.block_diag
torch.block_diag(*tensors)
Create a block diagonal matrix from provided tensors.
Parameters:
      *tensors -- One or more tensors with 0, 1, or 2 dimensions.
Returns:
      A 2 dimensional tensor with all the input tensors arranged in
      order such that their upper left and lower right corners are
      diagonally adjacent. All other elements are set to 0.
Return type:
      Tensor
Example:
  >>> import torch
  >>> A = torch.tensor([[0, 1], [1, 0]])
  >>> B = torch.tensor([[3, 4, 5], [6, 7, 8]])
  >>> C = torch.tensor(7)
  >>> D = torch.tensor([1, 2, 3])
  >>> E = torch.tensor([[4], [5], [6]])
  >>> torch.block_diag(A, B, C, D, E)
  tensor([[0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
          [1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 3, 4, 5, 0, 0, 0, 0, 0],
          [0, 0, 6, 7, 8, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 7, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0, 1, 2, 3, 0],


[0, 0, 0, 0, 0, 0, 1, 2, 3, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 4],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 6]])


torch.Tensor.unique
Tensor.unique(sorted=True, return_inverse=False, return_counts=False, dim=None)
Returns the unique elements of the input tensor.
See "torch.unique()"


torch.nn.functional.max_pool3d
torch.nn.functional.max_pool3d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False)
Applies a 3D max pooling over an input signal composed of several
   input planes.
Note:
 The order of "ceil_mode" and "return_indices" is different from
 what seen in "MaxPool3d", and will change in a future release.

See "MaxPool3d" for details.
Parameters:
      * input -- input tensor (\text{minibatch} ,
        \text{in_channels} , iD, iH , iW), minibatch dim optional.
  * **kernel_size** -- size of the pooling region. Can be a single
    number or a tuple *(kT, kH, kW)*

  * **stride** -- stride of the pooling operation. Can be a single
    number or a tuple *(sT, sH, sW)*. Default: "kernel_size"

  * **padding** -- Implicit negative infinity padding to be added
    on both sides, must be >= 0 and <= kernel_size / 2.


dilation -- The stride between elements within a sliding
        window, must be > 0.

ceil_mode -- If "True", will use ceil instead of floor
    to compute the output shape. This ensures that every element
    in the input tensor is covered by a sliding window.

return_indices -- If "True", will return the argmax along
    with the max values. Useful for
    "torch.nn.functional.max_unpool3d" later


enable_grad
class torch.enable_grad
Context-manager that enables gradient calculation.
Enables gradient calculation, if it has been disabled via "no_grad"
   or "set_grad_enabled".
This context manager is thread local; it will not affect
   computation in other threads.
Also functions as a decorator. (Make sure to instantiate with
   parenthesis.)
Note:
 enable_grad is one of several mechanisms that can enable or
 disable gradients locally see Locally disabling gradient
 computation for more information on how they compare.

Note:
 This API does not apply to forward-mode AD.

Example::
      >>> x = torch.tensor([1.], requires_grad=True)
      >>> with torch.no_grad():
      ...     with torch.enable_grad():
      ...         y = x * 2
      >>> y.requires_grad
      True
      >>> y.backward()
      >>> x.grad
      tensor([2.])
      >>> @torch.enable_grad()
      ... def doubler(x):
      ...     return x * 2
      >>> with torch.no_grad():


with torch.no_grad():
      ...     z = doubler(x)
      >>> z.requires_grad
      True


InstanceNorm2d
class torch.nn.InstanceNorm2d(num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False, device=None, dtype=None)
Applies Instance Normalization over a 4D input (a mini-batch of 2D
   inputs with additional channel dimension) as described in the paper
   Instance Normalization: The Missing Ingredient for Fast
   Stylization.
  y = \frac{x - \mathrm{E}[x]}{ \sqrt{\mathrm{Var}[x] + \epsilon}}
  * \gamma + \beta

The mean and standard-deviation are calculated per-dimension
   separately for each object in a mini-batch. \gamma and \beta are
   learnable parameter vectors of size C (where C is the input
   size) if "affine" is "True". The standard-deviation is calculated
   via the biased estimator, equivalent to torch.var(input,
   unbiased=False).
By default, this layer uses instance statistics computed from input
   data in both training and evaluation modes.
If "track_running_stats" is set to "True", during training this


layer keeps running estimates of its computed mean and variance,
   which are then used for normalization during evaluation. The
   running estimates are kept with a default "momentum" of 0.1.
Note:
 This "momentum" argument is different from one used in optimizer
 classes and the conventional notion of momentum. Mathematically,
 the update rule for running statistics here is \hat{x}_\text{new}
 = (1 - \text{momentum}) \times \hat{x} + \text{momentum} \times
 x_t, where \hat{x} is the estimated statistic and x_t is the new
 observed value.

Note:
 "InstanceNorm2d" and "LayerNorm" are very similar, but have some
 subtle differences. "InstanceNorm2d" is applied on each channel
 of channeled data like RGB images, but "LayerNorm" is usually
 applied on entire sample and often in NLP tasks. Additionally,
 "LayerNorm" applies elementwise affine transform, while
 "InstanceNorm2d" usually don't apply affine transform.

Parameters:


Parameters:
      * num_features (int) -- C from an expected input of size
        (N, C, H, W) or (C, H, W)
  * **eps** (*float*) -- a value added to the denominator for
    numerical stability. Default: 1e-5

  * **momentum** (*float*) -- the value used for the running_mean
    and running_var computation. Default: 0.1

  * **affine** (*bool*) -- a boolean value that when set to
    "True", this module has learnable affine parameters,
    initialized the same way as done for batch normalization.
    Default: "False".

  * **track_running_stats** (*bool*) -- a boolean value that when
    set to "True", this module tracks the running mean and
    variance, and when set to "False", this module does not track
    such statistics and always uses batch statistics in both
    training and eval modes. Default: "False"

Shape:
      * Input: (N, C, H, W) or (C, H, W)
  * Output: (N, C, H, W) or (C, H, W) (same shape as input)

Examples:


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


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


torch.cholesky
torch.cholesky(input, upper=False, *, out=None) -> Tensor
Computes the Cholesky decomposition of a symmetric positive-
   definite matrix A or for batches of symmetric positive-definite
   matrices.
If "upper" is "True", the returned matrix "U" is upper-triangular,
   and the decomposition has the form:
  A = U^TU

If "upper" is "False", the returned matrix "L" is lower-triangular,
   and the decomposition has the form:
  A = LL^T

If "upper" is "True", and A is a batch of symmetric positive-
   definite matrices, then the returned tensor will be composed of
   upper-triangular Cholesky factors of each of the individual
   matrices. Similarly, when "upper" is "False", the returned tensor
   will be composed of lower-triangular Cholesky factors of each of
   the individual matrices.
Warning:
 "torch.cholesky()" is deprecated in favor of
 "torch.linalg.cholesky()" and will be removed in a future PyTorch


release."L = torch.cholesky(A)" should be replaced with
    L = torch.linalg.cholesky(A)

 "U = torch.cholesky(A, upper=True)" should be replaced with

    U = torch.linalg.cholesky(A).mH

 This transform will produce equivalent results for all valid
 (symmetric positive definite) inputs.

Parameters:
      * input (Tensor) -- the input tensor A of size (*, n, n)
        where *** is zero or more batch dimensions consisting of
        symmetric positive-definite matrices.
  * **upper** (*bool**, **optional*) -- flag that indicates
    whether to return a upper or lower triangular matrix. Default:
    "False"

Keyword Arguments:
      out (Tensor, optional) -- the output matrix
Example:
  >>> a = torch.randn(3, 3)
  >>> a = a @ a.mT + 1e-3 # make symmetric positive-definite
  >>> l = torch.cholesky(a)
  >>> a
  tensor([[ 2.4112, -0.7486,  1.4551],
          [-0.7486,  1.3544,  0.1294],


[-0.7486,  1.3544,  0.1294],
              [ 1.4551,  0.1294,  1.6724]])
      >>> l
      tensor([[ 1.5528,  0.0000,  0.0000],
              [-0.4821,  1.0592,  0.0000],
              [ 0.9371,  0.5487,  0.7023]])
      >>> l @ l.mT
      tensor([[ 2.4112, -0.7486,  1.4551],
              [-0.7486,  1.3544,  0.1294],
              [ 1.4551,  0.1294,  1.6724]])
      >>> a = torch.randn(3, 2, 2) # Example for batched input
      >>> a = a @ a.mT + 1e-03 # make symmetric positive-definite
      >>> l = torch.cholesky(a)
      >>> z = l @ l.mT
      >>> torch.dist(z, a)
      tensor(2.3842e-07)


torch.narrow_copy
torch.narrow_copy(input, dim, start, length, *, out=None) -> Tensor
Same as "Tensor.narrow()" except this returns a copy rather than
   shared storage. This is primarily for sparse tensors, which do not
   have a shared-storage narrow method.
Parameters:
      * input (Tensor) -- the tensor to narrow
  * **dim** (*int*) -- the dimension along which to narrow

  * **start** (*int*) -- index of the element to start the
    narrowed dimension from. Can be negative, which means indexing
    from the end of *dim*

  * **length** (*int*) -- length of the narrowed dimension, must
    be weakly positive

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> x = torch.tensor([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
  >>> torch.narrow_copy(x, 0, 0, 2)
  tensor([[ 1,  2,  3],
          [ 4,  5,  6]])
  >>> torch.narrow_copy(x, 1, 1, 2)
  tensor([[ 2,  3],
          [ 5,  6],


tensor([[ 2,  3],
              [ 5,  6],
              [ 8,  9]])
      >>> s = torch.arange(16).reshape(2, 2, 2, 2).to_sparse(2)
      >>> torch.narrow_copy(s, 0, 0, 1)
      tensor(indices=tensor([[0, 0],
                             [0, 1]]),
             values=tensor([[[0, 1],
                             [2, 3]],
                        [[4, 5],
                         [6, 7]]]),
         size=(1, 2, 2, 2), nnz=2, layout=torch.sparse_coo)

See also: "torch.narrow()" for a non copy variant


torch.Tensor.logical_not
Tensor.logical_not() -> Tensor
See "torch.logical_not()"


torch.nn.utils.parametrizations.spectral_norm
torch.nn.utils.parametrizations.spectral_norm(module, name='weight', n_power_iterations=1, eps=1e-12, dim=None)
Applies spectral normalization to a parameter in the given module.
  \mathbf{W}_{SN} = \dfrac{\mathbf{W}}{\sigma(\mathbf{W})},
  \sigma(\mathbf{W}) = \max_{\mathbf{h}: \mathbf{h} \ne 0}
  \dfrac{\|\mathbf{W} \mathbf{h}\|_2}{\|\mathbf{h}\|_2}

When applied on a vector, it simplifies to
  \mathbf{x}_{SN} = \dfrac{\mathbf{x}}{\|\mathbf{x}\|_2}

Spectral normalization stabilizes the training of discriminators
   (critics) in Generative Adversarial Networks (GANs) by reducing the
   Lipschitz constant of the model. \sigma is approximated performing
   one iteration of the power method every time the weight is
   accessed. If the dimension of the weight tensor is greater than 2,
   it is reshaped to 2D in power iteration method to get spectral
   norm.


norm.
See Spectral Normalization for Generative Adversarial Networks .
Note:
 This function is implemented using the parametrization
 functionality in "register_parametrization()". It is a
 reimplementation of "torch.nn.utils.spectral_norm()".

Note:
 When this constraint is registered, the singular vectors
 associated to the largest singular value are estimated rather
 than sampled at random. These are then updated performing
 "n_power_iterations" of the power method whenever the tensor is
 accessed with the module on *training* mode.

Note:
 If the *_SpectralNorm* module, i.e.,
 *module.parametrization.weight[idx]*, is in training mode on
 removal, it will perform another power iteration. If you'd like
 to avoid this iteration, set the module to eval mode before its
 removal.

Parameters:
      * module (nn.Module) -- containing module
  * **name** (*str**, **optional*) -- name of weight parameter.


Default: ""weight"".
  * **n_power_iterations** (*int**, **optional*) -- number of
    power iterations to calculate spectral norm. Default: "1".

  * **eps** (*float**, **optional*) -- epsilon for numerical
    stability in calculating norms. Default: "1e-12".

  * **dim** (*int**, **optional*) -- dimension corresponding to
    number of outputs. Default: "0", except for modules that are
    instances of ConvTranspose{1,2,3}d, when it is "1"

Returns:
      The original module with a new parametrization registered to the
      specified weight
Return type:
      Module
Example:
  >>> snm = spectral_norm(nn.Linear(20, 40))
  >>> snm
  ParametrizedLinear(
    in_features=20, out_features=40, bias=True
    (parametrizations): ModuleDict(
      (weight): ParametrizationList(
        (0): _SpectralNorm()
      )
    )
  )
  >>> torch.linalg.matrix_norm(snm.weight, 2)
  tensor(1.0081, grad_fn=<AmaxBackward0>)


torch.sparse.spdiags
torch.sparse.spdiags(diagonals, offsets, shape, layout=None) -> Tensor
Creates a sparse 2D tensor by placing the values from rows of
   "diagonals" along specified diagonals of the output
The "offsets" tensor controls which diagonals are set.

If "offsets[i]" = 0, it is the main diagonal

If "offsets[i]" < 0, it is below the main diagonal

If "offsets[i]" > 0, it is above the main diagonal

The number of rows in "diagonals" must match the length of
   "offsets", and an offset may not be repeated.
Parameters:
      * diagonals (Tensor) -- Matrix storing diagonals row-wise
  * **offsets** (*Tensor*) -- The diagonals to be set, stored as a
    vector

  * **shape** (*2-tuple of ints*) -- The desired shape of the
    result

Keyword Arguments:
      layout ("torch.layout", optional) -- The desired layout of
      the returned tensor. "torch.sparse_coo", "torch.sparse_csc" and


"torch.sparse_csr" are supported. Default: "torch.sparse_coo"
Examples:
Set the main and first two lower diagonals of a matrix:
  >>> diags = torch.arange(9).reshape(3, 3)
  >>> diags
  tensor([[0, 1, 2],
          [3, 4, 5],
          [6, 7, 8]])
  >>> s = torch.sparse.spdiags(diags, torch.tensor([0, -1, -2]), (3, 3))
  >>> s
  tensor(indices=tensor([[0, 1, 2, 1, 2, 2],
                         [0, 1, 2, 0, 1, 0]]),
         values=tensor([0, 1, 2, 3, 4, 6]),
         size=(3, 3), nnz=6, layout=torch.sparse_coo)
  >>> s.to_dense()
  tensor([[0, 0, 0],
          [3, 1, 0],
          [6, 4, 2]])

Change the output layout:
  >>> diags = torch.arange(9).reshape(3, 3)
  >>> diags
  tensor([[0, 1, 2],[3, 4, 5], [6, 7, 8])
  >>> s = torch.sparse.spdiags(diags, torch.tensor([0, -1, -2]), (3, 3), layout=torch.sparse_csr)
  >>> s
  tensor(crow_indices=tensor([0, 1, 3, 6]),


tensor(crow_indices=tensor([0, 1, 3, 6]),
             col_indices=tensor([0, 0, 1, 0, 1, 2]),
             values=tensor([0, 3, 1, 6, 4, 2]), size=(3, 3), nnz=6,
             layout=torch.sparse_csr)
      >>> s.to_dense()
      tensor([[0, 0, 0],
              [3, 1, 0],
              [6, 4, 2]])
Set partial diagonals of a large output:
  >>> diags = torch.tensor([[1, 2], [3, 4]])
  >>> offsets = torch.tensor([0, -1])
  >>> torch.sparse.spdiags(diags, offsets, (5, 5)).to_dense()
  tensor([[1, 0, 0, 0, 0],
          [3, 2, 0, 0, 0],
          [0, 4, 0, 0, 0],
          [0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0]])

Note:
 When setting the values along a given diagonal the index into the
 diagonal and the index into the row of "diagonals" is taken as
 the column index in the output. This has the effect that when
 setting a diagonal with a positive offset *k* the first value
 along that diagonal will be the value in position *k* of the row


of "diagonals"
Specifying a positive offset:
  >>> diags = torch.tensor([[1, 2, 3], [1, 2, 3], [1, 2, 3]])
  >>> torch.sparse.spdiags(diags, torch.tensor([0, 1, 2]), (5, 5)).to_dense()
  tensor([[1, 2, 3, 0, 0],
          [0, 2, 3, 0, 0],
          [0, 0, 3, 0, 0],
          [0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0]])


torch.Tensor.float_power_
Tensor.float_power_(exponent) -> Tensor
In-place version of "float_power()"


torch.Tensor.igamma
Tensor.igamma(other) -> Tensor
See "torch.igamma()"


torch.compiled_with_cxx11_abi
torch.compiled_with_cxx11_abi()
Returns whether PyTorch was built with _GLIBCXX_USE_CXX11_ABI=1