torch.linalg.solve_extorch.linalg.solve_ex(A, B, , left=True, check_errors=False, out=None)
   A version of "solve()" that does not perform error checks unless
   "check_errors"= True. It also returns the "info" tensor returned
   by LAPACK's getrf.
   Note:
     When the inputs are on a CUDA device, this function synchronizes
     only when "check_errors"= True.
   Warning:
     This function is "experimental" and it may change in a future
     PyTorch release.
   Parameters:
      A (Tensor) -- tensor of shape (, n, n) where *** is
      zero or more batch dimensions.
   Keyword Arguments:
      * left (bool, optional) -- whether to solve the system
        AX=B or XA = B. Default: True.
      * check_errors (bool, optional) -- controls whether to
        check the content of "infos" and raise an error if it is non-
        zero. Default: False.
      * out (tuple, optional) -- tuple of two tensors to


write the output to. Ignored if None. Default: None.
   Returns:
      A named tuple (result, info).
   Examples:
      >>> A = torch.randn(3, 3)
      >>> Ainv, info = torch.linalg.solve_ex(A)
      >>> torch.dist(torch.linalg.inv(A), Ainv)
      tensor(0.)
      >>> info
      tensor(0, dtype=torch.int32)


torch.nn.functional.smooth_l1_losstorch.nn.functional.smooth_l1_loss(input, target, size_average=None, reduce=None, reduction='mean', beta=1.0)
   Function that uses a squared term if the absolute element-wise
   error falls below beta and an L1 term otherwise.
   See "SmoothL1Loss" for details.
   Return type:
      Tensor


MaxPool2dclass torch.nn.MaxPool2d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
   Applies a 2D 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, H, W), output (N, C, H_{out}, W_{out}) and "kernel_size"
   (kH, kW) can be precisely described as:
      \begin{aligned}     out(N_i, C_j, h, w) ={} & \max_{m=0, \ldots,
      kH-1} \max_{n=0, \ldots, kW-1} \                             &
      \text{input}(N_i, C_j, \text{stride[0]} \times h + m,
      \text{stride[1]} \times w + n) \end{aligned}
   If "padding" is non-zero, then the input is implicitly padded with
   negative infinity on both sides for "padding" number of points.
   "dilation" controls the spacing between the kernel points. It is
   harder to describe, but this link has a nice visualization of what
   "dilation" does.
   Note:


"dilation" does.
   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.
   The parameters "kernel_size", "stride", "padding", "dilation" can
   either be:
      * a single "int" -- in which case the same value is used for the
        height and width dimension
      * a "tuple" of two ints -- in which case, the first int is
        used for the height dimension, and the second int for the
        width dimension
   Parameters:
      * kernel_size (Union[int, Tuple[int,
        int]]) -- the size of the window to take a max over
      * stride (Union[int, Tuple[int, int]])
        -- the stride of the window. Default value is "kernel_size"
      * padding (Union[int, Tuple[int,
        int]]) -- Implicit negative infinity padding to be
        added on both sides


added on both sides
      * dilation (Union[int, Tuple[int,
        int]]) -- a parameter that controls the stride of
        elements in the window
      * return_indices (bool) -- if "True", will return the max
        indices along with the outputs. Useful for
        "torch.nn.MaxUnpool2d" later
      * ceil_mode (bool) -- when True, will use ceil instead
        of floor to compute the output shape
   Shape:
      * Input: (N, C, H_{in}, W_{in}) or (C, H_{in}, W_{in})
      * Output: (N, C, H_{out}, W_{out}) or (C, H_{out}, W_{out}),
        where
           H_{out} = \left\lfloor\frac{H_{in} + 2 * \text{padding[0]}
           - \text{dilation[0]}       \times (\text{kernel_size[0]} -
           1) - 1}{\text{stride[0]}} + 1\right\rfloor
           W_{out} = \left\lfloor\frac{W_{in} + 2 * \text{padding[1]}
           - \text{dilation[1]}       \times (\text{kernel_size[1]} -
           1) - 1}{\text{stride[1]}} + 1\right\rfloor
   Examples:


Examples:
      >>> # pool of square window of size=3, stride=2
      >>> m = nn.MaxPool2d(3, stride=2)
      >>> # pool of non-square window
      >>> m = nn.MaxPool2d((3, 2), stride=(2, 1))
      >>> input = torch.randn(20, 16, 50, 32)
      >>> output = m(input)


torch.jit.forktorch.jit.fork(func, args, kwargs)
   Creates an asynchronous task executing func and a reference to
   the value of the result of this execution. fork will return
   immediately, so the return value of func may not have been
   computed yet. To force completion of the task and access the return
   value invoke torch.jit.wait on the Future. fork invoked with a
   func which returns T is typed as torch.jit.Future[T]. fork
   calls can be arbitrarily nested, and may be invoked with positional
   and keyword arguments. Asynchronous execution will only occur when
   run in TorchScript. If run in pure python, fork will not execute
   in parallel. fork will also not execute in parallel when invoked
   while tracing, however the fork and wait calls will be captured
   in the exported IR Graph.
   Warning:
     fork* tasks will execute non-deterministically. We recommend
     only spawning parallel fork tasks for pure functions that do not


modify their inputs, module attributes, or global state.
   Parameters:
      * func (callable or torch.nn.Module) -- A Python
        function or torch.nn.Module that will be invoked. If
        executed in TorchScript, it will execute asynchronously,
        otherwise it will not. Traced invocations of fork will be
        captured in the IR.
      * args -- arguments to invoke func* with.
      * kwargs -- arguments to invoke func with.
   Returns:
      a reference to the execution of func. The value T can only
      be accessed by forcing completion of func through
      torch.jit.wait.
   Return type:
      torch.jit.Future[T]
   Example (fork a free function):
      import torch
      from torch import Tensor
      def foo(a : Tensor, b : int) -> Tensor:
          return a + b
      def bar(a):
          fut : torch.jit.Future[Tensor] = torch.jit.fork(foo, a, b=2)
          return torch.jit.wait(fut)
      script_bar = torch.jit.script(bar)


script_bar = torch.jit.script(bar)
      input = torch.tensor(2)
      # only the scripted version executes asynchronously
      assert script_bar(input) == bar(input)
      # trace is not run asynchronously, but fork is captured in IR
      graph = torch.jit.trace(bar, (input,)).graph
      assert "fork" in str(graph)
   Example (fork a module method):
      import torch
      from torch import Tensor
      class AddMod(torch.nn.Module):
          def forward(self, a: Tensor, b : int):
              return a + b
      class Mod(torch.nn.Module):
          def init(self):
              super(self).init()
              self.mod = AddMod()
          def forward(self, input):
              fut = torch.jit.fork(self.mod, a, b=2)
              return torch.jit.wait(fut)
      input = torch.tensor(2)
      mod = Mod()
      assert mod(input) == torch.jit.script(mod).forward(input)


torch.Tensor.conjTensor.conj() -> Tensor
   See "torch.conj()"


torch.nn.functional.logsigmoidtorch.nn.functional.logsigmoid(input) -> Tensor
   Applies element-wise \text{LogSigmoid}(x_i) = \log \left(\frac{1}{1
   + \exp(-x_i)}\right)
   See "LogSigmoid" for more details.


Parameterclass torch.nn.parameter.Parameter(data=None, requires_grad=True)
   A kind of Tensor that is to be considered a module parameter.
   Parameters are "Tensor" subclasses, that have a very special
   property when used with "Module" s - when they're assigned as
   Module attributes they are automatically added to the list of its
   parameters, and will appear e.g. in "parameters()" iterator.
   Assigning a Tensor doesn't have such effect. This is because one
   might want to cache some temporary state, like last hidden state of
   the RNN, in the model. If there was no such class as "Parameter",
   these temporaries would get registered too.
   Parameters:
      * data (Tensor) -- parameter tensor.
      * requires_grad (bool, optional) -- if the parameter
        requires gradient. See Locally disabling gradient computation
        for more details. Default: True


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


torch.Tensor.q_zero_pointTensor.q_zero_point() -> int
   Given a Tensor quantized by linear(affine) quantization, returns
   the zero_point of the underlying quantizer().


torch.Tensor.dimTensor.dim() -> int
   Returns the number of dimensions of "self" tensor.


PlaceholderObserverclass torch.quantization.observer.PlaceholderObserver(dtype=torch.float32, custom_op_name='', compute_dtype=None, quant_min=None, quant_max=None, is_dynamic=False)
   Observer that doesn't do anything and just passes its configuration
   to the quantized module's ".from_float()".
   Can be used for quantization to float16 which doesn't require
   determining ranges.
   Parameters:
      * dtype -- dtype argument to the quantize node needed to
        implement the reference model spec.
      * quant_min -- minimum value in quantized domain (TODO:
        align behavior with other observers)
      * quant_min -- maximum value in quantized domain
      * custom_op_name -- (temporary) specify this observer for an
        operator that doesn't require any observation (Can be used in
        Graph Mode Passes for special case ops).
      * compute_dtype (deprecated) -- if set, marks the future


quantize function to use dynamic quantization instead of
        static quantization. This field is deprecated, use
        is_dynamic=True instead.
      * is_dynamic -- if True, the quantize function in the
        reference model representation taking stats from this observer
        instance will use dynamic quantization.


torch.Tensor.element_sizeTensor.element_size() -> int
   Returns the size in bytes of an individual element.
   Example:
      >>> torch.tensor([]).element_size()
      4
      >>> torch.tensor([], dtype=torch.uint8).element_size()
      1


torch.Tensor.sin_Tensor.sin_() -> Tensor
   In-place version of "sin()"


torch.Tensor.lcmTensor.lcm(other) -> Tensor
   See "torch.lcm()"


torch.nn.utils.parametrize.is_parametrizedtorch.nn.utils.parametrize.is_parametrized(module, tensor_name=None)
   Returns "True" if module has an active parametrization.
   If the argument "tensor_name" is specified, returns "True" if
   "module[tensor_name]" is parametrized.
   Parameters:
      * module (nn.Module) -- module to query
      * tensor_name (str, optional) -- attribute in the
        module to query Default: "None"
   Return type:
      bool


torch.Tensor.scatter_reduce_Tensor.scatter_reduce_(dim, index, src, reduce, *, include_self=True) -> Tensor
   Reduces all values from the "src" tensor to the indices specified
   in the "index" tensor in the "self" tensor using the applied
   reduction defined via the "reduce" argument (""sum"", ""prod"",
   ""mean"", ""amax"", ""amin""). For each value in "src", it is
   reduced to an index in "self" which is specified by its index in
   "src" for "dimension != dim" and by the corresponding value in
   "index" for "dimension = dim". If "include_self="True"", the values
   in the "self" tensor are included in the reduction.
   "self", "index" and "src" should all have the same number of
   dimensions. It is also required that "index.size(d) <= src.size(d)"
   for all dimensions "d", and that "index.size(d) <= self.size(d)"
   for all dimensions "d != dim". Note that "index" and "src" do not
   broadcast.
   For a 3-D tensor with "reduce="sum"" and "include_self=True" the


output is given as:
      self[index[i][j][k]][j][k] += src[i][j][k]  # if dim == 0
      self[i][index[i][j][k]][k] += src[i][j][k]  # if dim == 1
      self[i][j][index[i][j][k]] += src[i][j][k]  # if dim == 2
   Note:
     This operation may behave nondeterministically when given tensors
     on a CUDA device. See Reproducibility for more information.
   Note:
     The backward pass is implemented only for "src.shape ==
     index.shape".
   Warning:
     This function is in beta and may change in the near future.
   Parameters:
      * dim (int) -- the axis along which to index
      * index (LongTensor) -- the indices of elements to scatter
        and reduce.
      * src (Tensor) -- the source elements to scatter and
        reduce
      * reduce (str) -- the reduction operation to apply for
        non-unique indices (""sum"", ""prod"", ""mean"", ""amax"",
        ""amin"")
      * include_self (bool) -- whether elements from the "self"


tensor are included in the reduction
   Example:
      >>> src = torch.tensor([1., 2., 3., 4., 5., 6.])
      >>> index = torch.tensor([0, 1, 0, 1, 2, 1])
      >>> input = torch.tensor([1., 2., 3., 4.])
      >>> input.scatter_reduce(0, index, src, reduce="sum")
      tensor([5., 14., 8., 4.])
      >>> input.scatter_reduce(0, index, src, reduce="sum", include_self=False)
      tensor([4., 12., 5., 4.])
      >>> input2 = torch.tensor([5., 4., 3., 2.])
      >>> input2.scatter_reduce(0, index, src, reduce="amax")
      tensor([5., 6., 5., 2.])
      >>> input2.scatter_reduce(0, index, src, reduce="amax", include_self=False)
      tensor([3., 6., 5., 2.])


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


torch.negativetorch.negative(input, *, out=None) -> Tensor
   Alias for "torch.neg()"


ReflectionPad3dclass torch.nn.ReflectionPad3d(padding)
   Pads the input tensor using the reflection of the input boundary.
   For N-dimensional padding, use "torch.nn.functional.pad()".
   Parameters:
      padding (int, tuple) -- the size of the padding. If is
      int, uses the same padding in all boundaries. If a 6-tuple,
      uses (\text{padding_left}, \text{padding_right},
      \text{padding_top}, \text{padding_bottom},
      \text{padding_front}, \text{padding_back})
   Shape:
      * Input: (N, C, D_{in}, H_{in}, W_{in}) or (C, D_{in}, H_{in},
        W_{in}).
      * Output: (N, C, D_{out}, H_{out}, W_{out}) or (C, D_{out},
        H_{out}, W_{out}), where
        D_{out} = D_{in} + \text{padding_front} +
        \text{padding_back}
        H_{out} = H_{in} + \text{padding_top} +
        \text{padding_bottom}
        W_{out} = W_{in} + \text{padding_left} +
        \text{padding_right}
   Examples:
      >>> m = nn.ReflectionPad3d(1)


Examples:
      >>> m = nn.ReflectionPad3d(1)
      >>> input = torch.arange(8, dtype=torch.float).reshape(1, 1, 2, 2, 2)
      >>> m(input)
      tensor([[[[[7., 6., 7., 6.],
                 [5., 4., 5., 4.],
                 [7., 6., 7., 6.],
                 [5., 4., 5., 4.]],
                [[3., 2., 3., 2.],
                 [1., 0., 1., 0.],
                 [3., 2., 3., 2.],
                 [1., 0., 1., 0.]],
                [[7., 6., 7., 6.],
                 [5., 4., 5., 4.],
                 [7., 6., 7., 6.],
                 [5., 4., 5., 4.]],
                [[3., 2., 3., 2.],
                 [1., 0., 1., 0.],
                 [3., 2., 3., 2.],
                 [1., 0., 1., 0.]]]]])


torch.nn.functional.grid_sampletorch.nn.functional.grid_sample(input, grid, mode='bilinear', padding_mode='zeros', align_corners=None)
   Given an "input" and a flow-field "grid", computes the "output"
   using "input" values and pixel locations from "grid".
   Currently, only spatial (4-D) and volumetric (5-D) "input" are
   supported.
   In the spatial (4-D) case, for "input" with shape (N, C,
   H_\text{in}, W_\text{in}) and "grid" with shape (N, H_\text{out},
   W_\text{out}, 2), the output will have shape (N, C, H_\text{out},
   W_\text{out}).
   For each output location "output[n, :, h, w]", the size-2 vector
   "grid[n, h, w]" specifies "input" pixel locations "x" and "y",
   which are used to interpolate the output value "output[n, :, h,
   w]". In the case of 5D inputs, "grid[n, d, h, w]" specifies the
   "x", "y", "z" pixel locations for interpolating "output[n, :, d, h,
   w]". "mode" argument specifies "nearest" or "bilinear"


interpolation method to sample the input pixels.
   "grid" specifies the sampling pixel locations normalized by the
   "input" spatial dimensions. Therefore, it should have most values
   in the range of "[-1, 1]". For example, values "x = -1, y = -1" is
   the left-top pixel of "input", and values  "x = 1, y = 1" is the
   right-bottom pixel of "input".
   If "grid" has values outside the range of "[-1, 1]", the
   corresponding outputs are handled as defined by "padding_mode".
   Options are
      * "padding_mode="zeros"": use "0" for out-of-bound grid
        locations,
      * "padding_mode="border"": use border values for out-of-bound
        grid locations,
      * "padding_mode="reflection"": use values at locations reflected
        by the border for out-of-bound grid locations. For location
        far away from the border, it will keep being reflected until
        becoming in bound, e.g., (normalized) pixel location "x =
        -3.5" reflects by border "-1" and becomes "x' = 1.5", then


reflects by border "1" and becomes "x'' = -0.5".
   Note:
     This function is often used in conjunction with "affine_grid()"
     to build Spatial Transformer Networks .
   Note:
     When using the CUDA backend, this operation may induce
     nondeterministic behaviour in its backward pass that is not
     easily switched off. Please see the notes on Reproducibility for
     background.
   Note:
     NaN values in "grid" would be interpreted as "-1".
   Parameters:
      * input (Tensor) -- input of shape (N, C, H_\text{in},
        W_\text{in}) (4-D case) or (N, C, D_\text{in}, H_\text{in},
        W_\text{in}) (5-D case)
      * grid (Tensor) -- flow-field of shape (N, H_\text{out},
        W_\text{out}, 2) (4-D case) or (N, D_\text{out}, H_\text{out},
        W_\text{out}, 3) (5-D case)
      * mode (str) -- interpolation mode to calculate output
        values "'bilinear'" | "'nearest'" | "'bicubic'". Default:


"'bilinear'" Note: "mode='bicubic'" supports only 4-D input.
        When "mode='bilinear'" and the input is 5-D, the interpolation
        mode used internally will actually be trilinear. However, when
        the input is 4-D, the interpolation mode will legitimately be
        bilinear.
      * padding_mode (str) -- padding mode for outside grid
        values "'zeros'" | "'border'" | "'reflection'". Default:
        "'zeros'"
      * align_corners (bool, optional) -- Geometrically, we
        consider the pixels of the input  as squares rather than
        points. If set to "True", the extrema ("-1" and "1") are
        considered as referring to the center points of the input's
        corner pixels. If set to "False", they are instead considered
        as referring to the corner points of the input's corner
        pixels, making the sampling more resolution agnostic. This
        option parallels the "align_corners" option in


"interpolate()", and so whichever option is used here should
        also be used there to resize the input image before grid
        sampling. Default: "False"
   Returns:
      output Tensor
   Return type:
      output (Tensor)
   Warning:
     When "align_corners = True", the grid positions depend on the
     pixel size relative to the input image size, and so the locations
     sampled by "grid_sample()" will differ for the same input given
     at different resolutions (that is, after being upsampled or
     downsampled). The default behavior up to version 1.2.0 was
     "align_corners = True". Since then, the default behavior has been
     changed to "align_corners = False", in order to bring it in line
     with the default for "interpolate()".
   Note:
     "mode='bicubic'" is implemented using the cubic convolution
     algorithm with \alpha=-0.75. The constant \alpha might be
     different from packages to packages. For example, PIL and OpenCV


use -0.5 and -0.75 respectively. This algorithm may "overshoot"
     the range of values it's interpolating. For example, it may
     produce negative values or values greater than 255 when
     interpolating input in [0, 255]. Clamp the results with :func:
     torch.clamp to ensure they are within the valid range.


torch.isintorch.isin(elements, test_elements, , assume_unique=False, invert=False) -> Tensor
   Tests if each element of "elements" is in "test_elements". Returns
   a boolean tensor of the same shape as "elements" that is True for
   elements in "test_elements" and False otherwise.
   Note:
     One of "elements" or "test_elements" can be a scalar, but not
     both.
   Parameters:
      * elements (Tensor or Scalar) -- Input elements
      * test_elements (Tensor or Scalar) -- Values against
        which to test for each input element
      * assume_unique (bool, optional) -- If True, assumes
        both "elements" and "test_elements" contain unique elements,
        which can speed up the calculation. Default: False
      * invert (bool, optional) -- If True, inverts the
        boolean return tensor, resulting in True values for elements
        not* in "test_elements". Default: False
   Returns:


Returns:
      A boolean tensor of the same shape as "elements" that is True
      for elements in "test_elements" and False otherwise
   -[ Example ]-

torch.isin(torch.tensor([[1, 2], [3, 4]]), torch.tensor([2, 3]))
   tensor([[False,  True],
           [ True, False]])


BackendPatternConfigclass torch.ao.quantization.backend_config.BackendPatternConfig(pattern=None)
   Config object that specifies quantization behavior for a given
   operator pattern. For a detailed example usage, see
   "BackendConfig".
   add_dtype_config(dtype_config)
      Add a set of supported data types passed as arguments to
      quantize ops in the reference model spec.
      Return type:
         BackendPatternConfig
   classmethod from_dict(backend_pattern_config_dict)
      Create a "BackendPatternConfig" from a dictionary with the
      following items:
         "pattern": the pattern being configured "observation_type":
         the "ObservationType" that specifies how observers should be
         inserted for this pattern "dtype_configs": a list of
         dictionaries that represents "DTypeConfig" s "root_module": a
         "torch.nn.Module" that represents the root for this pattern
         "qat_module": a "torch.nn.Module" that represents the QAT


implementation for this pattern "reference_quantized_module":
         a "torch.nn.Module" that represents the reference quantized
         implementation for this pattern's root module.
         "fused_module": a "torch.nn.Module" that represents the fused
         implementation for this pattern "fuser_method": a function
         that specifies how to fuse the pattern for this pattern
         "pattern_complex_format": the pattern specified in the
         reversed nested tuple format (deprecated)
      Return type:
         BackendPatternConfig
   set_dtype_configs(dtype_configs)
      Set the supported data types passed as arguments to quantize ops
      in the reference model spec, overriding all previously
      registered data types.
      Return type:
         BackendPatternConfig
   set_fused_module(fused_module)
      Set the module that represents the fused implementation for this
      pattern.
      Return type:
         BackendPatternConfig
   set_fuser_method(fuser_method)


set_fuser_method(fuser_method)
      Set the function that specifies how to fuse this
      BackendPatternConfig's pattern.
      The first argument of this function should be is_qat, and the
      rest of the arguments should be the items in the tuple pattern.
      The return value of this function should be the resulting fused
      module.
      For example, the fuser method for the pattern (torch.nn.Linear,
      torch.nn.ReLU) can be:
         def fuse_linear_relu(is_qat, linear, relu):
            return torch.ao.nn.intrinsic.LinearReLU(linear, relu)
      For a more complicated example, see https://gist.github.com/jer
      ryzh168/8bea7180a8ba3c279f2c9b050f2a69a6.
      Return type:
         BackendPatternConfig
   set_observation_type(observation_type)
      Set how observers should be inserted in the graph for this
      pattern.
      Observation type here refers to how observers (or quant-dequant
      ops) will be placed in the graph. This is used to produce the


desired reference patterns understood by the backend. Weighted
      ops such as linear and conv require different observers (or
      quantization parameters passed to quantize ops in the reference
      model) for the input and the output.
      There are two observation types:
         OUTPUT_USE_DIFFERENT_OBSERVER_AS_INPUT (default): the
         output observer instance will be different from the input.
         This is the most common observation type.
         OUTPUT_SHARE_OBSERVER_WITH_INPUT: the output observer
         instance will be the same as the input. This is useful for
         operators like cat.
      Note: This will be renamed in the near future, since we will
      soon insert QuantDeQuantStubs with observers (and fake
      quantizes) attached instead of observers themselves.
      Return type:
         BackendPatternConfig
   set_pattern(pattern)
      Set the pattern to configure.
      The pattern can be a float module, functional operator, pytorch


operator, or a tuple combination of the above. Tuple patterns
      are treated as sequential patterns, and currently only tuples of
      2 or 3 elements are supported.
      Return type:
         BackendPatternConfig
   set_qat_module(qat_module)
      Set the module that represents the QAT implementation for this
      pattern.
      Return type:
         BackendPatternConfig
   set_reference_quantized_module(reference_quantized_module)
      Set the module that represents the reference quantized
      implementation for this pattern's root module.
      For more detail, see "set_root_module()".
      Return type:
         BackendPatternConfig
   set_root_module(root_module)
      Set the module that represents the root for this pattern.
      When we construct the reference quantized model during the
      convert phase, the root modules (e.g. torch.nn.Linear for
      torch.ao.nn.intrinsic.LinearReLU) will be swapped to the
      corresponding reference quantized modules (e.g.


torch.ao.nn.reference.quantized.Linear). This allows custom
      backends to specify custom reference quantized module
      implementations to match the numerics of their lowered
      operators. Since this is a one-to-one mapping, both the root
      module and the reference quantized module must be specified in
      the same BackendPatternConfig in order for the conversion to
      take place.
      Return type:
         BackendPatternConfig
   to_dict()
      Convert this "BackendPatternConfig" to a dictionary with the
      items described in "from_dict()".
      Return type:
         Dict[str, Any]


torch.randntorch.randn(size, , out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False) -> Tensor
   Returns a tensor filled with random numbers from a normal
   distribution with mean 0 and variance 1 (also called the
   standard normal distribution).
      \text{out}_{i} \sim \mathcal{N}(0, 1)
   The shape of the tensor is defined by the variable argument "size".
   Parameters:
      size (int...) -- a sequence of integers defining the
      shape of the output tensor. Can be a variable number of
      arguments or a collection like a list or tuple.
   Keyword Arguments:
      * generator ("torch.Generator", optional) -- a pseudorandom
        number generator for sampling
      * out (Tensor, optional) -- the output tensor.
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default
        (see "torch.set_default_tensor_type()").


(see "torch.set_default_tensor_type()").
      * layout ("torch.layout", optional) -- the desired layout of
        returned Tensor. Default: "torch.strided".
      * device ("torch.device", optional) -- the desired device of
        returned tensor. Default: if "None", uses the current device
        for the default tensor type (see
        "torch.set_default_tensor_type()"). "device" will be the CPU
        for CPU tensor types and the current CUDA device for CUDA
        tensor types.
      * requires_grad (bool, optional) -- If autograd should
        record operations on the returned tensor. Default: "False".
      * pin_memory (bool, optional) -- If set, returned
        tensor would be allocated in the pinned memory. Works only for
        CPU tensors. Default: "False".
   Example:
      >>> torch.randn(4)
      tensor([-2.1436,  0.9966,  2.3426, -0.6366])
      >>> torch.randn(2, 3)
      tensor([[ 1.5954,  2.8929, -1.0923],


tensor([[ 1.5954,  2.8929, -1.0923],
              [ 1.1719, -0.4709, -0.1996]])


torch.linalg.lu_solvetorch.linalg.lu_solve(LU, pivots, B, , left=True, adjoint=False, out=None) -> Tensor
   Computes the solution of a square system of linear equations with a
   unique solution given an LU decomposition.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, this function
   computes the solution X \in \mathbb{K}^{n \times k} of the linear
   system associated to A \in \mathbb{K}^{n \times n}, B \in
   \mathbb{K}^{n \times k}, which is defined as
      AX = B
   where A is given factorized as returned by "lu_factor()".
   If "left"= False, this function returns the matrix X \in
   \mathbb{K}^{n \times k} that solves the system
      XA = B\mathrlap{\qquad A \in \mathbb{K}^{k \times k}, B \in
      \mathbb{K}^{n \times k}.}
   If  "adjoint"= True (and "left"= True), given an LU
   factorization of :math:`A* this function function returns the X \in
   \mathbb{K}^{n \times k} that solves the system


\mathbb{K}^{n \times k} that solves the system
      A^{\text{H}}X = B\mathrlap{\qquad A \in \mathbb{K}^{k \times k},
      B \in \mathbb{K}^{n \times k}.}
   where A^{\text{H}} is the conjugate transpose when A is complex,
   and the transpose when A is real-valued. The "left"= False case
   is analogous.
   Supports inputs of float, double, cfloat and cdouble dtypes. Also
   supports batches of matrices, and if the inputs are batches of
   matrices then the output has the same batch dimensions.
   Parameters:
      * LU (Tensor) -- tensor of shape (, n, n) (or (, k,
        k) if "left"= True) where *** is zero or more batch
        dimensions as returned by "lu_factor()".
      * pivots (Tensor) -- tensor of shape (, n) (or (, k)
        if "left"= True) where *** is zero or more batch dimensions
        as returned by "lu_factor()".
      * B (Tensor) -- right-hand side tensor of shape (, n,
        k)*.
   Keyword Arguments:


k).
   Keyword Arguments:
      * left (bool, optional) -- whether to solve the system
        AX=B or XA = B. Default: True.
      * adjoint (bool, optional) -- whether to solve the
        system AX=B or A^{\text{H}}X = B. Default: False.
      * out (Tensor, optional) -- output tensor. Ignored if
        None. Default: None*.
   Examples:
      >>> A = torch.randn(3, 3)
      >>> LU, pivots = torch.linalg.lu_factor(A)
      >>> B = torch.randn(3, 2)
      >>> X = torch.linalg.lu_solve(LU, pivots, B)
      >>> torch.allclose(A @ X, B)
      True
      >>> B = torch.randn(3, 3, 2)   # Broadcasting rules apply: A is broadcasted
      >>> X = torch.linalg.lu_solve(LU, pivots, B)
      >>> torch.allclose(A @ X, B)
      True
      >>> B = torch.randn(3, 5, 3)
      >>> X = torch.linalg.lu_solve(LU, pivots, B, left=False)
      >>> torch.allclose(X @ A, B)
      True
      >>> B = torch.randn(3, 3, 4)   # Now solve for A^T


X = torch.linalg.lu_solve(LU, pivots, B, adjoint=True)
      >>> torch.allclose(A.mT @ X, B)
      True


torch.sgntorch.sgn(input, , out=None) -> Tensor
   This function is an extension of torch.sign() to complex tensors.
   It computes a new tensor whose elements have the same angles as the
   corresponding elements of "input" and absolute values (i.e.
   magnitudes) of one for complex tensors and is equivalent to
   torch.sign() for non-complex tensors.
      \text{out}_{i} = \begin{cases}                 0 &
      |\text{{input}}_i| == 0 \
      \frac{{\text{{input}}_i}}{|{\text{{input}}_i}|} &
      \text{otherwise}                 \end{cases}
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> t = torch.tensor([3+4j, 7-24j, 0, 1+2j])
      >>> t.sgn()
      tensor([0.6000+0.8000j, 0.2800-0.9600j, 0.0000+0.0000j, 0.4472+0.8944j])


torch.matrix_powertorch.matrix_power(input, n, *, out=None) -> Tensor
   Alias for "torch.linalg.matrix_power()"


torch.Tensor.storage_typeTensor.storage_type() -> type
   Returns the type of the underlying storage.


torch.cuda.OutOfMemoryErrorexception torch.cuda.OutOfMemoryError
   Exception raised when CUDA is out of memory


torch.as_tensortorch.as_tensor(data, dtype=None, device=None) -> Tensor
   Converts "data" into a tensor, sharing data and preserving autograd
   history if possible.
   If "data" is already a tensor with the requested dtype and device
   then "data" itself is returned, but if "data" is a tensor with a
   different dtype or device then it's copied as if using
   data.to(dtype=dtype, device=device).
   If "data" is a NumPy array (an ndarray) with the same dtype and
   device then a tensor is constructed using "torch.from_numpy()".
   See also:
     "torch.tensor()" never shares its data and creates a new "leaf
     tensor" (see Autograd mechanics).
   Parameters:
      * data (array_like) -- Initial data for the tensor. Can be
        a list, tuple, NumPy "ndarray", scalar, and other types.
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", infers data type from
        "data".


"data".
      * device ("torch.device", optional) -- the device of the
        constructed tensor. If None and data is a tensor then the
        device of data is used. If None and data is not a tensor then
        the result tensor is constructed on the CPU.
   Example:
      >>> a = numpy.array([1, 2, 3])
      >>> t = torch.as_tensor(a)
      >>> t
      tensor([ 1,  2,  3])
      >>> t[0] = -1
      >>> a
      array([-1,  2,  3])
      >>> a = numpy.array([1, 2, 3])
      >>> t = torch.as_tensor(a, device=torch.device('cuda'))
      >>> t
      tensor([ 1,  2,  3])
      >>> t[0] = -1
      >>> a
      array([1,  2,  3])


torch.nn.functional.softplustorch.nn.functional.softplus(input, beta=1, threshold=20) -> Tensor
   Applies element-wise, the function \text{Softplus}(x) =
   \frac{1}{\beta} * \log(1 + \exp(\beta * x)).
   For numerical stability the implementation reverts to the linear
   function when input \times \beta > threshold.
   See "Softplus" for more details.


torch.tiletorch.tile(input, dims) -> Tensor
   Constructs a tensor by repeating the elements of "input". The
   "dims" argument specifies the number of repetitions in each
   dimension.
   If "dims" specifies fewer dimensions than "input" has, then ones
   are prepended to "dims" until all dimensions are specified. For
   example, if "input" has shape (8, 6, 4, 2) and "dims" is (2, 2),
   then "dims" is treated as (1, 1, 2, 2).
   Analogously, if "input" has fewer dimensions than "dims" specifies,
   then "input" is treated as if it were unsqueezed at dimension zero
   until it has as many dimensions as "dims" specifies. For example,
   if "input" has shape (4, 2) and "dims" is (3, 3, 2, 2), then
   "input" is treated as if it had the shape (1, 1, 4, 2).
   Note:
     This function is similar to NumPy's tile function.
   Parameters:
      * input (Tensor) -- the tensor whose elements to repeat.
      * dims (tuple) -- the number of repetitions per dimension.
   Example:


Example:
      >>> x = torch.tensor([1, 2, 3])
      >>> x.tile((2,))
      tensor([1, 2, 3, 1, 2, 3])
      >>> y = torch.tensor([[1, 2], [3, 4]])
      >>> torch.tile(y, (2, 2))
      tensor([[1, 2, 1, 2],
              [3, 4, 3, 4],
              [1, 2, 1, 2],
              [3, 4, 3, 4]])


Conv3dclass torch.nn.Conv3d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
   Applies a 3D convolution over an input signal composed of several
   input planes.
   In the simplest case, the output value of the layer with input size
   (N, C_{in}, D, H, W) and output (N, C_{out}, D_{out}, H_{out},
   W_{out}) can be precisely described as:
      out(N_i, C_{out_j}) = bias(C_{out_j}) +
      \sum_{k = 0}^{C_{in} - 1} weight(C_{out_j}, k) \star input(N_i,
      k)
   where \star is the valid 3D cross-correlation operator
   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 padding applied to the input. It
     can be either a string {'valid', 'same'} or a tuple of ints


giving the amount of implicit padding applied on both sides.
   * "dilation" controls the spacing between the kernel points; also
     known as the Ã  trous algorithm. It is harder to describe, but
     this link has a nice visualization of what "dilation" does.
   * "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
          \frac{\text{out_channels}}{\text{in_channels}}).
   The parameters "kernel_size", "stride", "padding", "dilation" can
   either be:


either be:
      * a single "int" -- in which case the same value is used for the
        depth, height and width dimension
      * a "tuple" of three ints -- in which case, the first int is
        used for the depth dimension, the second int for the height
        dimension and the third int for the width dimension
   Note:
     When groups == in_channels and out_channels == K *
     in_channels, where K is a positive integer, this operation is
     also known as a "depthwise convolution".In other words, for an
     input of size (N, C_{in}, L_{in}), a depthwise convolution with a
     depthwise multiplier K can be performed with the arguments
     (C_\text{in}=C_\text{in}, C_\text{out}=C_\text{in} \times
     \text{K}, ..., \text{groups}=C_\text{in}).
   Note:
     In some circumstances when given tensors on a CUDA device and
     using CuDNN, this operator may select a nondeterministic
     algorithm to increase performance. If this is undesirable, you


can try to make the operation deterministic (potentially at a
     performance cost) by setting "torch.backends.cudnn.deterministic
     = True". See Reproducibility for more information.
   Note:
     "padding='valid'" is the same as no padding. "padding='same'"
     pads the input so the output has the shape as the input. However,
     this mode doesn't support any stride values other than 1.
   Note:
     This module supports complex data types i.e. "complex32,
     complex64, complex128".
   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, tuple or str, optional) --
        Padding added to all six 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"
   Shape:
Input: (N, C_{in}, D_{in}, H_{in}, W_{in}) or (C_{in}, D_{in},
    H_{in}, W_{in})
Output: (N, C_{out}, D_{out}, H_{out}, W_{out}) or (C_{out},
    D_{out}, H_{out}, W_{out}), where
       D_{out} = \left\lfloor\frac{D_{in} + 2 \times
       \text{padding}[0] - \text{dilation}[0]       \times
       (\text{kernel_size}[0] - 1) - 1}{\text{stride}[0]} +
       1\right\rfloor
       H_{out} = \left\lfloor\frac{H_{in} + 2 \times


\text{padding}[1] - \text{dilation}[1]       \times
           (\text{kernel_size}[1] - 1) - 1}{\text{stride}[1]} +
           1\right\rfloor
           W_{out} = \left\lfloor\frac{W_{in} + 2 \times
           \text{padding}[2] - \text{dilation}[2]       \times
           (\text{kernel_size}[2] - 1) - 1}{\text{stride}[2]} +
           1\right\rfloor
   Variables:
      * weight (Tensor) -- the learnable weights of the module
        of shape (\text{out_channels},
        \frac{\text{in_channels}}{\text{groups}},
        \text{kernel_size[0]}, \text{kernel_size[1]},
        \text{kernel_size[2]}). The values of these weights are
        sampled from \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
        \frac{groups}{C_\text{in} *
        \prod_{i=0}^{2}\text{kernel_size}[i]}
      * 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{in} *
        \prod_{i=0}^{2}\text{kernel_size}[i]}
   Examples:
      >>> # With square kernels and equal stride
      >>> m = nn.Conv3d(16, 33, 3, stride=2)
      >>> # non-square kernels and unequal stride and with padding
      >>> m = nn.Conv3d(16, 33, (3, 5, 2), stride=(2, 1, 1), padding=(4, 2, 0))
      >>> input = torch.randn(20, 16, 10, 50, 100)
      >>> output = m(input)


torch.Tensor.cudaTensor.cuda(device=None, non_blocking=False, memory_format=torch.preserve_format) -> Tensor
   Returns a copy of this object in CUDA memory.
   If this object is already in CUDA memory and on the correct device,
   then no copy is performed and the original object is returned.
   Parameters:
      * device ("torch.device") -- The destination GPU device.
        Defaults to the current CUDA device.
      * non_blocking (bool) -- If "True" and the source is in
        pinned memory, the copy will be asynchronous with respect to
        the host. Otherwise, the argument has no effect. Default:
        "False".
      * memory_format ("torch.memory_format", optional) -- the
        desired memory format of returned Tensor. Default:
        "torch.preserve_format".


torch.Tensor.exponential_Tensor.exponential_(lambd=1, *, generator=None) -> Tensor
   Fills "self" tensor with elements drawn from the exponential
   distribution:
      f(x) = \lambda e^{-\lambda x}


torch.randn_liketorch.randn_like(input, , dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) -> Tensor
   Returns a tensor with the same size as "input" that is filled with
   random numbers from a normal distribution with mean 0 and variance
   1. "torch.randn_like(input)" is equivalent to
   "torch.randn(input.size(), dtype=input.dtype, layout=input.layout,
   device=input.device)".
   Parameters:
      input (Tensor) -- the size of "input" will determine size
      of the output tensor.
   Keyword Arguments:
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned Tensor. Default: if "None", defaults to the dtype
        of "input".
      * layout ("torch.layout", optional) -- the desired layout of
        returned tensor. Default: if "None", defaults to the layout of
        "input".
      * device* ("torch.device", optional) -- the desired device of


returned tensor. Default: if "None", defaults to the device of
        "input".
      * requires_grad (bool, optional) -- If autograd should
        record operations on the returned tensor. Default: "False".
      * memory_format ("torch.memory_format", optional) -- the
        desired memory format of returned Tensor. Default:
        "torch.preserve_format".


torch.nn.functional.poisson_nll_losstorch.nn.functional.poisson_nll_loss(input, target, log_input=True, full=False, size_average=None, eps=1e-08, reduce=None, reduction='mean')
   Poisson negative log likelihood loss.
   See "PoissonNLLLoss" for details.
   Parameters:
      * input (Tensor) -- expectation of underlying Poisson
        distribution.
      * target (Tensor) -- random sample target \sim
        \text{Poisson}(input).
      * log_input (bool) -- if "True" the loss is computed as
        \exp(\text{input}) - \text{target} * \text{input}, if "False"
        then loss is \text{input} - \text{target} *
        \log(\text{input}+\text{eps}). Default: "True"
      * full (bool) -- whether to compute full loss, i. e. to
        add the Stirling approximation term. Default: "False"
        \text{target} * \log(\text{target}) - \text{target} + 0.5 *
        \log(2 * \pi * \text{target}).


\log(2 * \pi * \text{target}).
      * 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
        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"
      * eps (float, optional) -- Small value to avoid
        evaluation of \log(0) when "log_input"="False". Default: 1e-8
      * 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'"
   Return type:
      Tensor


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


torch.maxtorch.max(input) -> Tensor
   Returns the maximum value of all elements in the "input" tensor.
   Warning:
     This function produces deterministic (sub)gradients unlike
     "max(dim=0)"
   Parameters:
      input (Tensor) -- the input tensor.
   Example:
      >>> a = torch.randn(1, 3)
      >>> a
      tensor([[ 0.6763,  0.7445, -2.2369]])
      >>> torch.max(a)
      tensor(0.7445)
   torch.max(input, dim, keepdim=False, *, out=None)
   Returns a namedtuple "(values, indices)" where "values" is the
   maximum value of each row of the "input" tensor in the given
   dimension "dim". And "indices" is the index location of each
   maximum value found (argmax).
   If "keepdim" is "True", the output tensors are of the same size as
   "input" except in the dimension "dim" where they are of size 1.
   Otherwise, "dim" is squeezed (see "torch.squeeze()"), resulting in
   the output tensors having 1 fewer dimension than "input".
   Note:


Note:
     If there are multiple maximal values in a reduced row then the
     indices of the first maximal value are returned.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dim (int) -- the dimension to reduce.
      * keepdim (bool) -- whether the output tensor has "dim"
        retained or not. Default: "False".
   Keyword Arguments:
      out (tuple, optional) -- the result tuple of two
      output tensors (max, max_indices)
   Example:
      >>> a = torch.randn(4, 4)
      >>> a
      tensor([[-1.2360, -0.2942, -0.1222,  0.8475],
              [ 1.1949, -1.1127, -2.2379, -0.6702],
              [ 1.5717, -0.9207,  0.1297, -1.8768],
              [-0.6172,  1.0036, -0.6060, -0.2432]])
      >>> torch.max(a, 1)
      torch.return_types.max(values=tensor([0.8475, 1.1949, 1.5717, 1.0036]), indices=tensor([3, 0, 0, 1]))
   torch.max(input, other, *, out=None) -> Tensor
   See "torch.maximum()".


torch.Tensor.storageTensor.storage() -> torch.TypedStorage
   Returns the underlying "TypedStorage".
   Warning:
     "TypedStorage" is deprecated. It will be removed in the future,
     and "UntypedStorage" will be the only storage class. To access
     the "UntypedStorage" directly, use "Tensor.untyped_storage()".


torch.Tensor.crossTensor.cross(other, dim=None) -> Tensor
   See "torch.cross()"


torch.corrcoeftorch.corrcoef(input) -> Tensor
   Estimates the Pearson product-moment correlation coefficient matrix
   of the variables given by the "input" matrix, where rows are the
   variables and columns are the observations.
   Note:
     The correlation coefficient matrix R is computed using the
     covariance matrix C as given by R_{ij} = \frac{ C_{ij} } { \sqrt{
     C_{ii} * C_{jj} } }
   Note:
     Due to floating point rounding, the resulting array may not be
     Hermitian and its diagonal elements may not be 1. The real and
     imaginary values are clipped to the interval [-1, 1] in an
     attempt to improve this situation.
   Parameters:
      input (Tensor) -- A 2D matrix containing multiple
      variables and observations, or a Scalar or 1D vector
      representing a single variable.
   Returns:
      (Tensor) The correlation coefficient matrix of the variables.
   See also: "torch.cov()" covariance matrix.
   Example:


Example:
      >>> x = torch.tensor([[0, 1, 2], [2, 1, 0]])
      >>> torch.corrcoef(x)
      tensor([[ 1., -1.],
              [-1.,  1.]])
      >>> x = torch.randn(2, 4)
      >>> x
      tensor([[-0.2678, -0.0908, -0.3766,  0.2780],
              [-0.5812,  0.1535,  0.2387,  0.2350]])
      >>> torch.corrcoef(x)
      tensor([[1.0000, 0.3582],
              [0.3582, 1.0000]])
      >>> torch.corrcoef(x[0])
      tensor(1.)


torch.bitwise_left_shifttorch.bitwise_left_shift(input, other, , out=None) -> Tensor
   Computes the left arithmetic shift of "input" by "other" bits. The
   input tensor must be of integral type. This operator supports
   broadcasting to a common shape and type promotion.
   The operation applied is:
      \text{out}_i = \text{input}_i << \text{other}_i
   Parameters:
      * input (Tensor or Scalar) -- the first input tensor
      * other (Tensor or Scalar) -- the second input tensor
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> torch.bitwise_left_shift(torch.tensor([-1, -2, 3], dtype=torch.int8), torch.tensor([1, 0, 3], dtype=torch.int8))
      tensor([-2, -2, 24], dtype=torch.int8)


torch.heavisidetorch.heaviside(input, values, , out=None) -> Tensor
   Computes the Heaviside step function for each element in "input".
   The Heaviside step function is defined as:
      \text{{heaviside}}(input, values) = \begin{cases}     0, &
      \text{if input < 0}\     values, & \text{if input == 0}\
      1, & \text{if input > 0} \end{cases}
   Parameters:
      * input (Tensor) -- the input tensor.
      * values (Tensor) -- The values to use where "input" is
        zero.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> input = torch.tensor([-1.5, 0, 2.0])
      >>> values = torch.tensor([0.5])
      >>> torch.heaviside(input, values)
      tensor([0.0000, 0.5000, 1.0000])
      >>> values = torch.tensor([1.2, -2.0, 3.5])
      >>> torch.heaviside(input, values)
      tensor([0., -2., 1.])


float16_dynamic_qconfigtorch.quantization.qconfig.float16_dynamic_qconfig
   alias of QConfig(activation=functools.partial(,
   dtype=torch.float16, is_dynamic=True){},
   weight=functools.partial(,
   dtype=torch.float16){})


torch.cuda.get_allocator_backendtorch.cuda.get_allocator_backend()
   Returns a string describing the active allocator backend as set by
   "PYTORCH_CUDA_ALLOC_CONF". Currently available backends are
   "native" (PyTorch's native caching allocator) and
   cudaMallocAsync` (CUDA's built-in asynchronous allocator).
   Note:
     See Memory management for details on choosing the allocator
     backend.
   Return type:
      str


torch.Tensor.cholesky_solveTensor.cholesky_solve(input2, upper=False) -> Tensor
   See "torch.cholesky_solve()"


torch.nn.functional.upsampletorch.nn.functional.upsample(input, size=None, scale_factor=None, mode='nearest', align_corners=None)
   Upsamples the input to either the given "size" or the given
   "scale_factor"
   Warning:
     This function is deprecated in favor of
     "torch.nn.functional.interpolate()". This is equivalent with
     "nn.functional.interpolate(...)".
   Note:
     This operation may produce nondeterministic gradients when given
     tensors on a CUDA device. See Reproducibility for more
     information.
   The algorithm used for upsampling is determined by "mode".
   Currently temporal, spatial and volumetric upsampling are
   supported, i.e. expected inputs are 3-D, 4-D or 5-D in shape.
   The input dimensions are interpreted in the form: mini-batch x
   channels x [optional depth] x [optional height] x width.
   The modes available for upsampling are: nearest, linear (3D-
   only), bilinear, bicubic (4D-only), trilinear (5D-only)
   Parameters:


Parameters:
      * input (Tensor) -- the input tensor
      * size (int or Tuple[int] or Tuple[int,
        int] or Tuple[int, int, int]) -- output
        spatial size.
      * scale_factor (float or Tuple[float]) --
        multiplier for spatial size. Has to match input size if it is
        a tuple.
      * mode (str) -- algorithm used for upsampling: "'nearest'"
        | "'linear'" | "'bilinear'" | "'bicubic'" | "'trilinear'".
        Default: "'nearest'"
      * align_corners (bool, optional) -- Geometrically, we
        consider the pixels of the input and output as squares rather
        than points. If set to "True", the input and output tensors
        are aligned by the center points of their corner pixels,
        preserving the values at the corner pixels. If set to "False",
        the input and output tensors are aligned by the corner points


of their corner pixels, and the interpolation uses edge value
        padding for out-of-boundary values, making this operation
        independent of input size when "scale_factor" is kept the
        same. This only has an effect when "mode" is "'linear'",
        "'bilinear'", "'bicubic'" or "'trilinear'". Default: "False"
   Note:
     With "mode='bicubic'", it's possible to cause overshoot, in other
     words it can produce negative values or values greater than 255
     for images. Explicitly call "result.clamp(min=0, max=255)" if you
     want to reduce the overshoot when displaying the image.
   Warning:
     With "align_corners = True", the linearly interpolating modes
     (linear, bilinear, and trilinear) don't proportionally
     align the output and input pixels, and thus the output values can
     depend on the input size. This was the default behavior for these
     modes up to version 0.3.1. Since then, the default behavior is


"align_corners = False". See "Upsample" for concrete examples on
     how this affects the outputs.


torch.nn.functional.relu_torch.nn.functional.relu_(input) -> Tensor
   In-place version of "relu()".


torch.Tensor.storage_offsetTensor.storage_offset() -> int
   Returns "self" tensor's offset in the underlying storage in terms
   of number of storage elements (not bytes).
   Example:
      >>> x = torch.tensor([1, 2, 3, 4, 5])
      >>> x.storage_offset()
      0
      >>> x[3:].storage_offset()
      3


Hardswishclass torch.ao.nn.quantized.Hardswish(scale, zero_point)
   This is the quantized version of "Hardswish".
   Parameters:
      * scale -- quantization scale of the output tensor
      * zero_point -- quantization zero point of the output tensor


torch.linalg.vecdottorch.linalg.vecdot(x, y, , dim=- 1, out=None) -> Tensor
   Computes the dot product of two batches of vectors along a
   dimension.
   In symbols, this function computes
      \sum_{i=1}^n \overline{x_i}y_i.
   over the dimension "dim" where \overline{x_i} denotes the conjugate
   for complex vectors, and it is the identity for real vectors.
   Supports input of half, bfloat16, float, double, cfloat, cdouble
   and integral dtypes. It also supports broadcasting.
   Parameters:
      * x (Tensor) -- first batch of vectors of shape (, n).
      * y (Tensor) -- second batch of vectors of shape (, n).
   Keyword Arguments:
      * dim (int) -- Dimension along which to compute the dot
        product. Default: -1.
      * out (Tensor, optional) -- output tensor. Ignored if
        None. Default: None*.
   Examples:
      >>> v1 = torch.randn(3, 2)
      >>> v2 = torch.randn(3, 2)
      >>> linalg.vecdot(v1, v2)


linalg.vecdot(v1, v2)
      tensor([ 0.3223,  0.2815, -0.1944])
      >>> torch.vdot(v1[0], v2[0])
      tensor(0.3223)


torch.Tensor.strideTensor.stride(dim) -> tuple or int
   Returns the stride of "self" tensor.
   Stride is the jump necessary to go from one element to the next one
   in the specified dimension "dim". A tuple of all strides is
   returned when no argument is passed in. Otherwise, an integer value
   is returned as the stride in the particular dimension "dim".
   Parameters:
      dim (int, optional) -- the desired dimension in which
      stride is required
   Example:
      >>> x = torch.tensor([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
      >>> x.stride()
      (5, 1)
      >>> x.stride(0)
      5
      >>> x.stride(-1)
      1


torch.Tensor.bitwise_left_shift_Tensor.bitwise_left_shift_(other) -> Tensor
   In-place version of "bitwise_left_shift()"


torch.Tensor.logsumexpTensor.logsumexp(dim, keepdim=False) -> Tensor
   See "torch.logsumexp()"


ReplicationPad1dclass torch.nn.ReplicationPad1d(padding)
   Pads the input tensor using replication of the input boundary.
   For N-dimensional padding, use "torch.nn.functional.pad()".
   Parameters:
      padding (int, tuple) -- the size of the padding. If is
      int, uses the same padding in all boundaries. If a 2-tuple,
      uses (\text{padding_left}, \text{padding_right})
   Shape:
      * Input: (C, W_{in}) or (N, C, W_{in}).
      * Output: (C, W_{out}) or (N, C, W_{out}), where
        W_{out} = W_{in} + \text{padding_left} +
        \text{padding_right}
   Examples:
      >>> m = nn.ReplicationPad1d(2)
      >>> input = torch.arange(8, dtype=torch.float).reshape(1, 2, 4)
      >>> input
      tensor([[[0., 1., 2., 3.],
               [4., 5., 6., 7.]]])
      >>> m(input)
      tensor([[[0., 0., 0., 1., 2., 3., 3., 3.],
               [4., 4., 4., 5., 6., 7., 7., 7.]]])
      >>> # using different paddings for different sides


m = nn.ReplicationPad1d((3, 1))
      >>> m(input)
      tensor([[[0., 0., 0., 0., 1., 2., 3., 3.],
               [4., 4., 4., 4., 5., 6., 7., 7.]]])


torch.linalg.qrtorch.linalg.qr(A, mode='reduced', , out=None)
   Computes the QR decomposition of a matrix.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, the full QR
   decomposition of a matrix A \in \mathbb{K}^{m \times n} is
   defined as
      A = QR\mathrlap{\qquad Q \in \mathbb{K}^{m \times m}, R \in
      \mathbb{K}^{m \times n}}
   where Q is orthogonal in the real case and unitary in the complex
   case, and R is upper triangular with real diagonal (even in the
   complex case).
   When m > n (tall matrix), as R is upper triangular, its last m
   - n rows are zero. In this case, we can drop the last m - n
   columns of Q to form the reduced QR decomposition:
      A = QR\mathrlap{\qquad Q \in \mathbb{K}^{m \times n}, R \in
      \mathbb{K}^{n \times n}}
   The reduced QR decomposition agrees with the full QR decomposition
   when n >= m* (wide matrix).
   Supports input of float, double, cfloat and cdouble dtypes. Also


supports batches of matrices, and if "A" is a batch of matrices
   then the output has the same batch dimensions.
   The parameter "mode" chooses between the full and reduced QR
   decomposition. If "A" has shape (, m, n), denoting k = min(m,
   n)
   * "mode"= 'reduced' (default): Returns (Q, R) of shapes (, m,
     k), (, k, n) respectively. It is always differentiable.
   * "mode"= 'complete': Returns (Q, R) of shapes (, m, m),
     (, m, n) respectively. It is differentiable for m <= n.
   * "mode"= 'r': Computes only the reduced R. Returns (Q, R)
     with Q empty and R of shape (, k, n). It is never
     differentiable.
   Differences with numpy.linalg.qr:
   * "mode"= 'raw' is not implemented.
   * Unlike numpy.linalg.qr, this function always returns a tuple of
     two tensors. When "mode"= 'r', the Q tensor is an empty
     tensor.
   Warning:
     The elements in the diagonal of R are not necessarily positive.


As such, the returned QR decomposition is only unique up to the
     sign of the diagonal of R. Therefore, different platforms, like
     NumPy, or inputs on different devices, may produce different
     valid decompositions.
   Warning:
     The QR decomposition is only well-defined if the first k =
     min(m, n) columns of every matrix in "A" are linearly
     independent. If this condition is not met, no error will be
     thrown, but the QR produced may be incorrect and its autodiff may
     fail or produce incorrect results.
   Parameters:
      * A (Tensor) -- tensor of shape (, m, n) where *** is
        zero or more batch dimensions.
      * mode (str, optional) -- one of 'reduced',
        'complete', 'r'. Controls the shape of the returned
        tensors. Default: 'reduced'.
   Keyword Arguments:
      out (tuple, optional) -- output tuple of two tensors.
      Ignored if None. Default: None.
   Returns:
      A named tuple (Q, R)*.
   Examples:


A named tuple (Q, R).
   Examples:
      >>> A = torch.tensor([[12., -51, 4], [6, 167, -68], [-4, 24, -41]])
      >>> Q, R = torch.linalg.qr(A)
      >>> Q
      tensor([[-0.8571,  0.3943,  0.3314],
              [-0.4286, -0.9029, -0.0343],
              [ 0.2857, -0.1714,  0.9429]])
      >>> R
      tensor([[ -14.0000,  -21.0000,   14.0000],
              [   0.0000, -175.0000,   70.0000],
              [   0.0000,    0.0000,  -35.0000]])
      >>> (Q @ R).round()
      tensor([[  12.,  -51.,    4.],
              [   6.,  167.,  -68.],
              [  -4.,   24.,  -41.]])
      >>> (Q.T @ Q).round()
      tensor([[ 1.,  0.,  0.],
              [ 0.,  1., -0.],
              [ 0., -0.,  1.]])
      >>> Q2, R2 = torch.linalg.qr(A, mode='r')
      >>> Q2
      tensor([])
      >>> torch.equal(R, R2)
      True
      >>> A = torch.randn(3, 4, 5)
      >>> Q, R = torch.linalg.qr(A, mode='complete')
      >>> torch.dist(Q @ R, A)
      tensor(1.6099e-06)
      >>> torch.dist(Q.mT @ Q, torch.eye(4))


torch.dist(Q.mT @ Q, torch.eye(4))
      tensor(6.2158e-07)


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


torch.Tensor.fliplrTensor.fliplr() -> Tensor
   See "torch.fliplr()"


torch.Tensor.addmm_Tensor.addmm_(mat1, mat2, *, beta=1, alpha=1) -> Tensor
   In-place version of "addmm()"


torch.Tensor.logical_or_Tensor.logical_or_() -> Tensor
   In-place version of "logical_or()"


torch.cuda.get_arch_listtorch.cuda.get_arch_list()
   Returns list CUDA architectures this library was compiled for.
   Return type:
      List[str]


torch.Tensor.bitwise_right_shift_Tensor.bitwise_right_shift_(other) -> Tensor
   In-place version of "bitwise_right_shift()"


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


torch.is_complextorch.is_complex(input)
   Returns True if the data type of "input" is a complex data type
   i.e., one of "torch.complex64", and "torch.complex128".
   Parameters:
      input (Tensor) -- the input tensor.


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


CosineAnnealingLRclass torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max, eta_min=0, last_epoch=- 1, verbose=False)
   Set the learning rate of each parameter group using a cosine
   annealing schedule, where \eta_{max} is set to the initial lr and
   T_{cur} is the number of epochs since the last restart in SGDR:
      \begin{aligned}     \eta_t & = \eta_{min} +
      \frac{1}{2}(\eta_{max} - \eta_{min})\left(1     +
      \cos\left(\frac{T_{cur}}{T_{max}}\pi\right)\right),     &
      T_{cur} \neq (2k+1)T_{max}; \     \eta_{t+1} & = \eta_{t} +
      \frac{1}{2}(\eta_{max} - \eta_{min})     \left(1 -
      \cos\left(\frac{1}{T_{max}}\pi\right)\right),     & T_{cur} =
      (2k+1)T_{max}. \end{aligned}
   When last_epoch=-1, sets initial lr as lr. Notice that because the
   schedule is defined recursively, the learning rate can be
   simultaneously modified outside this scheduler by other operators.
   If the learning rate is set solely by this scheduler, the learning


rate at each step becomes:
      \eta_t = \eta_{min} + \frac{1}{2}(\eta_{max} -
      \eta_{min})\left(1 +
      \cos\left(\frac{T_{cur}}{T_{max}}\pi\right)\right)
   It has been proposed in SGDR: Stochastic Gradient Descent with Warm
   Restarts. Note that this only implements the cosine annealing part
   of SGDR, and not the restarts.
   Parameters:
      * optimizer (Optimizer) -- Wrapped optimizer.
      * T_max (int) -- Maximum number of iterations.
      * eta_min (float) -- Minimum learning rate. Default: 0.
      * last_epoch (int) -- The index of last epoch. Default:
        -1.
      * verbose (bool) -- If "True", prints a message to stdout
        for each update. Default: "False".
   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.


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


torch.is_floating_pointtorch.is_floating_point(input)
   Returns True if the data type of "input" is a floating point data
   type i.e., one of "torch.float64", "torch.float32",
   "torch.float16", and "torch.bfloat16".
   Parameters:
      input (Tensor) -- the input tensor.


Conv1dclass torch.ao.nn.quantized.Conv1d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
   Applies a 1D convolution over a quantized input signal composed of
   several quantized input planes.
   For details on input arguments, parameters, and implementation see
   "Conv1d".
   Note:
     Only zeros is supported for the "padding_mode" argument.
   Note:
     Only torch.quint8 is supported for the input data type.
   Variables:
      * weight (Tensor) -- packed tensor derived from the
        learnable weight parameter.
      * scale (Tensor) -- scalar for the output scale
      * zero_point (Tensor) -- scalar for the output zero point
   See "Conv1d" for other attributes.
   Examples:
      >>> m = nn.quantized.Conv1d(16, 33, 3, stride=2)
      >>> input = torch.randn(20, 16, 100)
      >>> # quantize input to quint8


quantize input to quint8
  >>> q_input = torch.quantize_per_tensor(input, scale=1.0, zero_point=0,
  ...                                     dtype=torch.quint8)
  >>> output = m(q_input)

classmethod from_float(mod)
      Creates a quantized module from a float module or qparams_dict.
      Parameters:
         mod (Module) -- a float module, either produced by
         torch.ao.quantization utilities or provided by the user


disable_observerclass torch.quantization.fake_quantize.disable_observer(mod)
   Disable observation for this module, if applicable. Example usage:
      # model is any PyTorch model
      model.apply(torch.ao.quantization.disable_observer)


torch.autograd.graph.Node.metadataabstract Node.metadata()
   Returns the metadata.
   Return type:
      dict


torch.Tensor.arccosh_Tensor.arccosh_()
   acosh_() -> Tensor
   In-place version of "arccosh()"


DTypeConfigclass torch.ao.quantization.backend_config.DTypeConfig(input_dtype=None, output_dtype=None, weight_dtype=None, bias_dtype=None, is_dynamic=None)
   Config object that specifies the supported data types passed as
   arguments to quantize ops in the reference model spec, for input
   and output activations, weights, and biases.
   For example, consider the following reference model:
      quant1 - [dequant1 - fp32_linear - quant2] - dequant2
   The pattern in the square brackets refers to the reference pattern
   of statically quantized linear. Setting the input dtype as
   torch.quint8 in the DTypeConfig means we pass in torch.quint8
   as the dtype argument to the first quantize op (quant1). Similarly,
   setting the output dtype as torch.quint8 means we pass in
   torch.quint8 as the dtype argument to the second quantize op
   (quant2).
   Note that the dtype here does not refer to the interface dtypes of
   the op. For example, the "input dtype" here is not the dtype of the


input tensor passed to the quantized linear op. Though it can still
   be the same as the interface dtype, this is not always the case,
   e.g. the interface dtype is fp32 in dynamic quantization but the
   "input dtype" specified in the DTypeConfig would still be quint8.
   The semantics of dtypes here are the same as the semantics of the
   dtypes specified in the observers.
   These dtypes are matched against the ones specified in the userâs
   QConfig. If there is a match, and the QConfig satisfies the
   constraints specified in the DTypeConfig (if any), then we will
   quantize the given pattern using this DTypeConfig. Otherwise, the
   QConfig is ignored and the pattern will not be quantized.
   Example usage:
      >>> dtype_config1 = DTypeConfig(
      ...     input_dtype=torch.quint8,
      ...     output_dtype=torch.quint8,
      ...     weight_dtype=torch.qint8,
      ...     bias_dtype=torch.float)
      >>> dtype_config2 = DTypeConfig(
      ...     input_dtype=DTypeWithConstraints(


...     input_dtype=DTypeWithConstraints(
      ...         dtype=torch.quint8,
      ...         quant_min_lower_bound=0,
      ...         quant_max_upper_bound=255,
      ...     ),
      ...     output_dtype=DTypeWithConstraints(
      ...         dtype=torch.quint8,
      ...         quant_min_lower_bound=0,
      ...         quant_max_upper_bound=255,
      ...     ),
      ...     weight_dtype=DTypeWithConstraints(
      ...         dtype=torch.qint8,
      ...         quant_min_lower_bound=-128,
      ...         quant_max_upper_bound=127,
      ...     ),
      ...     bias_dtype=torch.float)
      >>> dtype_config1.input_dtype
      torch.quint8
      >>> dtype_config2.input_dtype
      torch.quint8
      >>> dtype_config2.input_dtype_with_constraints
      DTypeWithConstraints(dtype=torch.quint8, quant_min_lower_bound=0, quant_max_upper_bound=255, scale_min_lower_bound=None, scale_max_upper_bound=None)
   classmethod from_dict(dtype_config_dict)


classmethod from_dict(dtype_config_dict)
      Create a "DTypeConfig" from a dictionary with the following
      items (all optional):
         "input_dtype": torch.dtype or "DTypeWithConstraints"
         "output_dtype": torch.dtype or "DTypeWithConstraints"
         "weight_dtype": torch.dtype or "DTypeWithConstraints"
         "bias_type": torch.dtype "is_dynamic": bool
      Return type:
         DTypeConfig
   to_dict()
      Convert this "DTypeConfig" to a dictionary with the items
      described in "from_dict()".
      Return type:
         Dict[str, Any]


BCEWithLogitsLossclass torch.nn.BCEWithLogitsLoss(weight=None, size_average=None, reduce=None, reduction='mean', pos_weight=None)
   This loss combines a Sigmoid layer and the BCELoss in one
   single class. This version is more numerically stable than using a
   plain Sigmoid followed by a BCELoss as, by combining the
   operations into one layer, we take advantage of the log-sum-exp
   trick for numerical stability.
   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 = - w_n
      \left[ y_n \cdot \log \sigma(x_n) + (1 - y_n) \cdot \log (1 -
      \sigma(x_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}


\end{cases}
   This is used for measuring the error of a reconstruction in for
   example an auto-encoder. Note that the targets t[i] should be
   numbers between 0 and 1.
   It's possible to trade off recall and precision by adding weights
   to positive examples. In the case of multi-label classification the
   loss can be described as:
      \ell_c(x, y) = L_c = {l_{1,c},\dots,l_{N,c}}^\top, \quad
      l_{n,c} = - w_{n,c} \left[ p_c y_{n,c} \cdot \log
      \sigma(x_{n,c}) + (1 - y_{n,c}) \cdot \log (1 - \sigma(x_{n,c}))
      \right],
   where c is the class number (c > 1 for multi-label binary
   classification, c = 1 for single-label binary classification), n is
   the number of the sample in the batch and p_c is the weight of the
   positive answer for the class c.
   p_c > 1 increases the recall, p_c < 1 increases the precision.
   For example, if a dataset contains 100 positive and 300 negative
   examples of a single class, then pos_weight for the class should


be equal to \frac{300}{100}=3. The loss would act as if the dataset
   contains 3\times 100=300 positive examples.
   Examples:
      >>> target = torch.ones([10, 64], dtype=torch.float32)  # 64 classes, batch size = 10
      >>> output = torch.full([10, 64], 1.5)  # A prediction (logit)
      >>> pos_weight = torch.ones([64])  # All weights are equal to 1
      >>> criterion = torch.nn.BCEWithLogitsLoss(pos_weight=pos_weight)
      >>> criterion(output, target)  # -log(sigmoid(1.5))
      tensor(0.20...)
   Parameters:
      * weight (Tensor, optional) -- a manual rescaling
        weight given to the loss of each batch element. If given, has
        to be a Tensor of size nbatch.
      * 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'"


pos_weight (Tensor, optional) -- a weight of
        positive examples. Must be a vector with length equal to the
        number of classes.
   Shape:
         * Input: (), where * means any number of dimensions.
         * Target: (), same shape as the input.
         * Output: scalar. If "reduction" is "'none'", then (*), same
           shape as input.
      Examples:
         >>> loss = nn.BCEWithLogitsLoss()
         >>> input = torch.randn(3, requires_grad=True)
         >>> target = torch.empty(3).random_(2)
         >>> output = loss(input, target)
         >>> output.backward()


torch.Tensor.nextafter_Tensor.nextafter_(other) -> Tensor
   In-place version of "nextafter()"


torch.Tensor.qschemeTensor.qscheme() -> torch.qscheme
   Returns the quantization scheme of a given QTensor.


torch.autograd.gradchecktorch.autograd.gradcheck(func, inputs, *, eps=1e-06, atol=1e-05, rtol=0.001, raise_exception=True, check_sparse_nnz=False, nondet_tol=0.0, check_undefined_grad=True, check_grad_dtypes=False, check_batched_grad=False, check_batched_forward_grad=False, check_forward_ad=False, check_backward_ad=True, fast_mode=False)
   Check gradients computed via small finite differences against
   analytical gradients w.r.t. tensors in "inputs" that are of
   floating point or complex type and with "requires_grad=True".
   The check between numerical and analytical gradients uses
   "allclose()".
   For most of the complex functions we consider for optimization
   purposes, no notion of Jacobian exists. Instead, gradcheck verifies
   if the numerical and analytical values of the Wirtinger and
   Conjugate Wirtinger derivatives are consistent. Because the
   gradient computation is done under the assumption that the overall


function has a real-valued output, we treat functions with complex
   output in a special way. For these functions, gradcheck is applied
   to two real-valued functions corresponding to taking the real
   components of the complex outputs for the first, and taking the
   imaginary components of the complex outputs for the second. For
   more details, check out Autograd for Complex Numbers.
   Note:
     The default values are designed for "input" of double precision.
     This check will likely fail if "input" is of less precision,
     e.g., "FloatTensor".
   Warning:
     If any checked tensor in "input" has overlapping memory, i.e.,
     different indices pointing to the same memory address (e.g., from
     "torch.expand()"), this check will likely fail because the
     numerical gradients computed by point perturbation at such
     indices will change values at all other indices that share the
     same memory address.
   Parameters:
      * func (function) -- a Python function that takes Tensor


inputs and returns a Tensor or a tuple of Tensors
      * inputs (tuple of Tensor or Tensor) -- inputs to the
        function
      * eps (float, optional) -- perturbation for finite
        differences
      * atol (float, optional) -- absolute tolerance
      * rtol (float, optional) -- relative tolerance
      * raise_exception (bool, optional) -- indicating
        whether to raise an exception if the check fails. The
        exception gives more information about the exact nature of the
        failure. This is helpful when debugging gradchecks.
      * check_sparse_nnz (bool, optional) -- if True,
        gradcheck allows for SparseTensor input, and for any
        SparseTensor at input, gradcheck will perform check at nnz
        positions only.
      * nondet_tol (float, optional) -- tolerance for non-
        determinism. When running identical inputs through the


differentiation, the results must either match exactly
        (default, 0.0) or be within this tolerance.
      * check_undefined_grad (bool, optional) -- if True,
        check if undefined output grads are supported and treated as
        zeros, for "Tensor" outputs.
      * check_batched_grad (bool, optional) -- if True,
        check if we can compute batched gradients using prototype vmap
        support. Defaults to False.
      * check_batched_forward_grad (bool, optional) -- if
        True, checks if we can compute batched forward gradients using
        forward ad and prototype vmap support. Defaults to False.
      * check_forward_ad (bool, optional) -- if True, check
        that the gradients computed with forward mode AD match the
        numerical ones. Defaults to False.
      * check_backward_ad (bool, optional) -- if False, do
        not perform any checks that rely on backward mode AD to be
        implemented. Defaults to True.


implemented. Defaults to True.
      * fast_mode (bool, optional) -- Fast mode for
        gradcheck and gradgradcheck is currently only implemented for
        R to R functions. If none of the inputs and outputs are
        complex a faster implementation of gradcheck that no longer
        computes the entire jacobian is run; otherwise, we fall back
        to the slow implementation.
   Returns:
      True if all differences satisfy allclose condition
   Return type:
      bool


MaxPool3dclass torch.nn.MaxPool3d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
   Applies a 3D 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, D, H, W), output (N, C, D_{out}, H_{out}, W_{out}) and
   "kernel_size" (kD, kH, kW) can be precisely described as:
      \begin{aligned}     \text{out}(N_i, C_j, d, h, w) ={} &
      \max_{k=0, \ldots, kD-1} \max_{m=0, \ldots, kH-1} \max_{n=0,
      \ldots, kW-1} \                                       &
      \text{input}(N_i, C_j, \text{stride[0]} \times d + k,
      \text{stride[1]} \times h + m, \text{stride[2]} \times w + n)
      \end{aligned}
   If "padding" is non-zero, then the input is implicitly padded with
   negative infinity on both sides for "padding" number of points.
   "dilation" controls the spacing between the kernel points. It is


harder to describe, but this link has a nice visualization of what
   "dilation" does.
   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.
   The parameters "kernel_size", "stride", "padding", "dilation" can
   either be:
      * a single "int" -- in which case the same value is used for the
        depth, height and width dimension
      * a "tuple" of three ints -- in which case, the first int is
        used for the depth dimension, the second int for the height
        dimension and the third int for the width dimension
   Parameters:
      * kernel_size (Union[int, Tuple[int, int,
        int]]) -- the size of the window to take a max over
      * stride (Union[int, Tuple[int, int,
        int]]) -- the stride of the window. Default value is
        "kernel_size"


"kernel_size"
      * padding (Union[int, Tuple[int, int,
        int]]) -- Implicit negative infinity padding to be
        added on all three sides
      * dilation (Union[int, Tuple[int, int,
        int]]) -- a parameter that controls the stride of
        elements in the window
      * return_indices (bool) -- if "True", will return the max
        indices along with the outputs. Useful for
        "torch.nn.MaxUnpool3d" later
      * ceil_mode (bool) -- when True, will use ceil instead
        of floor to compute the output shape
   Shape:
      * Input: (N, C, D_{in}, H_{in}, W_{in}) or (C, D_{in}, H_{in},
        W_{in}).
      * Output: (N, C, D_{out}, H_{out}, W_{out}) or (C, D_{out},
        H_{out}, W_{out}), where
           D_{out} = \left\lfloor\frac{D_{in} + 2 \times
           \text{padding}[0] - \text{dilation}[0] \times
           (\text{kernel_size}[0] - 1) - 1}{\text{stride}[0]} +


1\right\rfloor
           H_{out} = \left\lfloor\frac{H_{in} + 2 \times
           \text{padding}[1] - \text{dilation}[1] \times
           (\text{kernel_size}[1] - 1) - 1}{\text{stride}[1]} +
           1\right\rfloor
           W_{out} = \left\lfloor\frac{W_{in} + 2 \times
           \text{padding}[2] - \text{dilation}[2] \times
           (\text{kernel_size}[2] - 1) - 1}{\text{stride}[2]} +
           1\right\rfloor
   Examples:
      >>> # pool of square window of size=3, stride=2
      >>> m = nn.MaxPool3d(3, stride=2)
      >>> # pool of non-square window
      >>> m = nn.MaxPool3d((3, 2, 2), stride=(2, 1, 2))
      >>> input = torch.randn(20, 16, 50, 44, 31)
      >>> output = m(input)


torch.Tensor.index_reduceTensor.index_reduce()


torch.hspmmtorch.hspmm(mat1, mat2, , out=None) -> Tensor
   Performs a matrix multiplication of a sparse COO matrix "mat1" and
   a strided matrix "mat2". The result is a (1 + 1)-dimensional hybrid
   COO matrix.
   Parameters:
      * mat1 (Tensor) -- the first sparse matrix to be matrix
        multiplied
      * mat2 (Tensor) -- the second strided matrix to be matrix
        multiplied
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.


torch.sparse.sampled_addmmtorch.sparse.sampled_addmm(input, mat1, mat2, , beta=1., alpha=1., out=None) -> Tensor
   Performs a matrix multiplication of the dense matrices "mat1" and
   "mat2" at the locations specified by the sparsity pattern of
   "input". The matrix "input" is added to the final result.
   Mathematically this performs the following operation:
      \text{out} = \alpha\ (\text{mat1} \mathbin{@}
      \text{mat2})\text{spy}(\text{input}) + \beta\ \text{input}
   where \text{spy}(\text{input}) is the sparsity pattern matrix of
   "input", "alpha" and "beta" are the scaling factors.
   \text{spy}(\text{input}) has value 1 at the positions where "input"
   has non-zero values, and 0 elsewhere.
   Note:
     "input" must be a sparse CSR tensor. "mat1" and "mat2" must be
     dense tensors.
   Parameters:
      * input (Tensor) -- a sparse CSR matrix of shape (m, n)
        to be added and used to compute the sampled matrix
        multiplication


multiplication
      * mat1 (Tensor) -- a dense matrix of shape (m, k) to be
        multiplied
      * mat2 (Tensor) -- a dense matrix of shape (k, n) to be
        multiplied
   Keyword Arguments:
      * beta (Number, optional) -- multiplier for "input"
        (\beta)
      * alpha (Number, optional) -- multiplier for mat1 @
        mat2 (\alpha)
      * out (Tensor, optional) -- output tensor. Ignored if
        None. Default: None.
   Examples:
      >>> input = torch.eye(3, device='cuda').to_sparse_csr()
      >>> mat1 = torch.randn(3, 5, device='cuda')
      >>> mat2 = torch.randn(5, 3, device='cuda')
      >>> torch.sparse.sampled_addmm(input, mat1, mat2)
      tensor(crow_indices=tensor([0, 1, 2, 3]),
          col_indices=tensor([0, 1, 2]),
          values=tensor([ 0.2847, -0.7805, -0.1900]), device='cuda:0',
          size=(3, 3), nnz=3, layout=torch.sparse_csr)
      >>> torch.sparse.sampled_addmm(input, mat1, mat2).to_dense()


tensor([[ 0.2847,  0.0000,  0.0000],
          [ 0.0000, -0.7805,  0.0000],
          [ 0.0000,  0.0000, -0.1900]], device='cuda:0')
      >>> torch.sparse.sampled_addmm(input, mat1, mat2, beta=0.5, alpha=0.5)
      tensor(crow_indices=tensor([0, 1, 2, 3]),
          col_indices=tensor([0, 1, 2]),
          values=tensor([ 0.1423, -0.3903, -0.0950]), device='cuda:0',
          size=(3, 3), nnz=3, layout=torch.sparse_csr)


torch.taketorch.take(input, index) -> Tensor
   Returns a new tensor with the elements of "input" at the given
   indices. The input tensor is treated as if it were viewed as a 1-D
   tensor. The result takes the same shape as the indices.
   Parameters:
      * input (Tensor) -- the input tensor.
      * index (LongTensor) -- the indices into tensor
   Example:
      >>> src = torch.tensor([[4, 3, 5],
      ...                     [6, 7, 8]])
      >>> torch.take(src, torch.tensor([0, 2, 5]))
      tensor([ 4,  5,  8])


torch.Tensor.equalTensor.equal(other) -> bool
   See "torch.equal()"


default_weight_only_qconfigtorch.quantization.qconfig.default_weight_only_qconfig
   alias of QConfig(activation=,
   weight=functools.partial(,
   observer=,
   quant_min=-128, quant_max=127, dtype=torch.qint8,
   qscheme=torch.per_tensor_symmetric, reduce_range=False){})


torch.vandertorch.vander(x, N=None, increasing=False) -> Tensor
   Generates a Vandermonde matrix.
   The columns of the output matrix are elementwise powers of the
   input vector x^{(N-1)}, x^{(N-2)}, ..., x^0. If increasing is True,
   the order of the columns is reversed x^0, x^1, ..., x^{(N-1)}. Such
   a matrix with a geometric progression in each row is named for
   Alexandre-Theophile Vandermonde.
   Parameters:
      * x (Tensor) -- 1-D input tensor.
      * N (int, optional) -- Number of columns in the
        output. If N is not specified, a square array is returned (N =
        len(x)).
      * increasing (bool, optional) -- Order of the powers
        of the columns. If True, the powers increase from left to
        right, if False (the default) they are reversed.
   Returns:
      Vandermonde matrix. If increasing is False, the first column is
      x^{(N-1)}, the second x^{(N-2)} and so forth. If increasing is


True, the columns are x^0, x^1, ..., x^{(N-1)}.
   Return type:
      Tensor
   Example:
      >>> x = torch.tensor([1, 2, 3, 5])
      >>> torch.vander(x)
      tensor([[  1,   1,   1,   1],
              [  8,   4,   2,   1],
              [ 27,   9,   3,   1],
              [125,  25,   5,   1]])
      >>> torch.vander(x, N=3)
      tensor([[ 1,  1,  1],
              [ 4,  2,  1],
              [ 9,  3,  1],
              [25,  5,  1]])
      >>> torch.vander(x, N=3, increasing=True)
      tensor([[ 1,  1,  1],
              [ 1,  2,  4],
              [ 1,  3,  9],
              [ 1,  5, 25]])


NLLLossclass torch.nn.NLLLoss(weight=None, size_average=None, ignore_index=- 100, reduce=None, reduction='mean')
   The negative log likelihood loss. It is useful to train a
   classification problem with C classes.
   If provided, the optional argument "weight" should be a 1D Tensor
   assigning weight to each of the classes. This is particularly
   useful when you have an unbalanced training set.
   The input given through a forward call is expected to contain
   log-probabilities of each class. input has to be a Tensor of size
   either (minibatch, C) or (minibatch, C, d_1, d_2, ..., d_K) with K
   \geq 1 for the K-dimensional case. The latter is useful for
   higher dimension inputs, such as computing NLL loss per-pixel for
   2D images.
   Obtaining log-probabilities in a neural network is easily achieved
   by adding a  LogSoftmax  layer in the last layer of your network.
   You may use CrossEntropyLoss instead, if you prefer not to add an
   extra layer.


extra layer.
   The target that this loss expects should be a class index in the
   range [0, C-1] where C = number of classes; if ignore_index is
   specified, this loss also accepts this class index (this index may
   not necessarily be in the class range).
   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 = - w_{y_n}
      x_{n,y_n}, \quad w_{c} = \text{weight}[c] \cdot \mathbb{1}{c
      \not= \text{ignore_index}},
   where x is the input, y is the target, w is the weight, and N is
   the batch size. If "reduction" is not "'none'" (default "'mean'"),
   then
      \ell(x, y) = \begin{cases}     \sum_{n=1}^N
      \frac{1}{\sum_{n=1}^N w_{y_n}} l_n, &     \text{if reduction} =
      \text{mean';}\\     \sum_{n=1}^N l_n,  &     \text{if
      reduction} = \text{sum'.} \end{cases}
   Parameters:
      * weight (Tensor, optional) -- a manual rescaling


weight given to each class. If given, it has to be a Tensor of
        size C. Otherwise, it is treated as if having all ones.
      * size_average (bool, optional) -- Deprecated (see
        "reduction"). By default, the losses are averaged over each
        loss element in the batch. Note that for some losses, there
        are multiple elements per sample. If the field "size_average"
        is set to "False", the losses are instead summed for each
        minibatch. Ignored when "reduce" is "False". Default: "None"
      * ignore_index (int, optional) -- Specifies a target
        value that is ignored and does not contribute to the input
        gradient. When "size_average" is "True", the loss is averaged
        over non-ignored targets.
      * 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:
        "None"
      * reduction (str, optional) -- Specifies the reduction
        to apply to the output: "'none'" | "'mean'" | "'sum'".
        "'none'": no reduction will be applied, "'mean'": the weighted
        mean of the output is taken, "'sum'": the output will be
        summed. Note: "size_average" and "reduce" are in the process
        of being deprecated, and in the meantime, specifying either of
        those two args will override "reduction". Default: "'mean'"
   Shape:
      * Input: (N, C) or (C), where C = number of classes, or (N, C,
        d_1, d_2, ..., d_K) with K \geq 1 in the case of
        K-dimensional loss.
      * Target: (N) or (), where each value is 0 \leq
        \text{targets}[i] \leq C-1, or (N, d_1, d_2, ..., d_K) with K
        \geq 1 in the case of K-dimensional loss.


\geq 1 in the case of K-dimensional loss.
      * Output: If "reduction" is "'none'", shape (N) or (N, d_1, d_2,
        ..., d_K) with K \geq 1 in the case of K-dimensional loss.
        Otherwise, scalar.
   Examples:
      >>> m = nn.LogSoftmax(dim=1)
      >>> loss = nn.NLLLoss()
      >>> # input is of size N x C = 3 x 5
      >>> input = torch.randn(3, 5, requires_grad=True)
      >>> # each element in target has to have 0 <= value < C
      >>> target = torch.tensor([1, 0, 4])
      >>> output = loss(m(input), target)
      >>> output.backward()
      >>>
      >>>
      >>> # 2D loss example (used, for example, with image inputs)
      >>> N, C = 5, 4
      >>> loss = nn.NLLLoss()
      >>> # input is of size N x C x height x width
      >>> data = torch.randn(N, 16, 10, 10)
      >>> conv = nn.Conv2d(16, C, (3, 3))
      >>> m = nn.LogSoftmax(dim=1)
      >>> # each element in target has to have 0 <= value < C
      >>> target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)


output = loss(m(conv(data)), target)
      >>> output.backward()


CUDAPluggableAllocatorclass torch.cuda.CUDAPluggableAllocator(path_to_so_file, alloc_fn_name, free_fn_name)
   CUDA memory allocator loaded from a so file.
   Memory allocators are compiled in .so files and loaded dynamically
   using ctypes. To change the active allocator use the
   "torch.memory.cuda.change_current_allocator()" function.
   Parameters:
      * path_to_so_file (str) -- Path in the filesystem to the
        .so file containing the allocator functions
      * alloc_fn_name (str) -- Name of the function to perform
        the memory allocation in the so file. The signature must be:
        void alloc_fn_name(ssize_t size, int device, cudaStream_t
        stream);
      * free_fn_name (str) -- Name of the function to perform
        the memory release in the so file. The signature must be: void
        free_fn_name(void ptr, size_t size, cudaStream_t stream);
   Warning:
     This is currently supported only in unix OSs
   Note:


Note:
     See Memory management for details on creating and using a custom
     allocator


torch.set_deterministic_debug_modetorch.set_deterministic_debug_mode(debug_mode)
   Sets the debug mode for deterministic operations.
   Note:
     This is an alternative interface for
     "torch.use_deterministic_algorithms()". Refer to that function's
     documentation for details about affected operations.
   Parameters:
      debug_mode (str or int) -- If "default" or 0, don't
      error or warn on nondeterministic operations. If "warn" or 1,
      warn on nondeterministic operations. If "error" or 2, error on
      nondeterministic operations.


torch.Tensor.is_coalescedTensor.is_coalesced() -> bool
   Returns "True" if "self" is a sparse COO tensor that is coalesced,
   "False" otherwise.
   Warning:
     Throws an error if "self" is not a sparse COO tensor.
   See "coalesce()" and uncoalesced tensors.


ReLU6class torch.ao.nn.quantized.ReLU6(inplace=False)
   Applies the element-wise function:
   \text{ReLU6}(x) = \min(\max(x_0, x), q(6)), where x_0 is the
   zero_point, and q(6) is the quantized representation of number 6.
   Parameters:
      inplace (bool) -- can optionally do the operation in-
      place. Default: "False"
   Shape:
      * Input: (N, ) where *** means, any number of additional
        dimensions
      * Output: (N, ), same shape as the input
   [image]
   Examples:
      >>> m = nn.quantized.ReLU6()
      >>> input = torch.randn(2)
      >>> input = torch.quantize_per_tensor(input, 1.0, 0, dtype=torch.qint32)
      >>> output = m(input)