Parameters:
         * state_dict (dict) -- a dict containing parameters and
           persistent buffers.
         * strict (bool, optional) -- whether to strictly
           enforce that the keys in "state_dict" match the keys
           returned by this module's "state_dict()" function. Default:
           "True"
      Returns:
         * missing_keys is a list of str containing the missing
           keys
         * unexpected_keys is a list of str containing the
           unexpected keys
      Return type:
         "NamedTuple" with "missing_keys" and "unexpected_keys" fields
      Note:
        If a parameter or buffer is registered as "None" and its
        corresponding key exists in "state_dict", "load_state_dict()"
        will raise a "RuntimeError".
   modules()
      Returns an iterator over all modules in the network.
      Yields:
         Module -- a module in the network
      Return type:
         Iterator[Module]
      Note:


Iterator[Module]
      Note:
        Duplicate modules are returned only once. In the following
        example, "l" will be returned only once.
      Example:
         >>> l = nn.Linear(2, 2)
         >>> net = nn.Sequential(l, l)
         >>> for idx, m in enumerate(net.modules()):
         ...     print(idx, '->', m)
         0 -> Sequential(
           (0): Linear(in_features=2, out_features=2, bias=True)
           (1): Linear(in_features=2, out_features=2, bias=True)
         )
         1 -> Linear(in_features=2, out_features=2, bias=True)
   named_buffers(prefix='', recurse=True, remove_duplicate=True)
      Returns an iterator over module buffers, yielding both the name
      of the buffer as well as the buffer itself.
      Parameters:
         * prefix (str) -- prefix to prepend to all buffer
           names.
         * recurse (bool, optional) -- if True, then yields
           buffers of this module and all submodules. Otherwise,


yields only buffers that are direct members of this module.
           Defaults to True.
         * remove_duplicate (bool, optional) -- whether to
           remove the duplicated buffers in the result. Defaults to
           True.
      Yields:
         (str, torch.Tensor) -- Tuple containing the name and buffer
      Return type:
         Iterator[Tuple[str, Tensor]]
      Example:
         >>> for name, buf in self.named_buffers():
         >>>     if name in ['running_var']:
         >>>         print(buf.size())
   named_children()
      Returns an iterator over immediate children modules, yielding
      both the name of the module as well as the module itself.
      Yields:
         (str, Module) -- Tuple containing a name and child module
      Return type:
         Iterator[Tuple[str, Module]]
      Example:
         >>> for name, module in model.named_children():
         >>>     if name in ['conv4', 'conv5']:
         >>>         print(module)


    print(module)

named_modules(memo=None, prefix='', remove_duplicate=True)
      Returns an iterator over all modules in the network, yielding
      both the name of the module as well as the module itself.
      Parameters:
         * memo (Optional[Set[Module]]) -- a memo to
           store the set of modules already added to the result
         * prefix (str) -- a prefix that will be added to the
           name of the module
         * remove_duplicate (bool) -- whether to remove the
           duplicated module instances in the result or not
      Yields:
         (str, Module) -- Tuple of name and module
      Note:
        Duplicate modules are returned only once. In the following
        example, "l" will be returned only once.
      Example:
         >>> l = nn.Linear(2, 2)
         >>> net = nn.Sequential(l, l)
         >>> for idx, m in enumerate(net.named_modules()):
         ...     print(idx, '->', m)
         0 -> ('', Sequential(


0 -> ('', Sequential(
           (0): Linear(in_features=2, out_features=2, bias=True)
           (1): Linear(in_features=2, out_features=2, bias=True)
         ))
         1 -> ('0', Linear(in_features=2, out_features=2, bias=True))
   named_parameters(prefix='', recurse=True, remove_duplicate=True)
      Returns an iterator over module parameters, yielding both the
      name of the parameter as well as the parameter itself.
      Parameters:
         * prefix (str) -- prefix to prepend to all parameter
           names.
         * recurse (bool) -- if True, then yields parameters of
           this module and all submodules. Otherwise, yields only
           parameters that are direct members of this module.
         * remove_duplicate (bool, optional) -- whether to
           remove the duplicated parameters in the result. Defaults to
           True.
      Yields:
         (str, Parameter) -- Tuple containing the name and parameter
      Return type:


Return type:
         Iterator[Tuple[str, Parameter]]
      Example:
         >>> for name, param in self.named_parameters():
         >>>     if name in ['bias']:
         >>>         print(param.size())
   parameters(recurse=True)
      Returns an iterator over module parameters.
      This is typically passed to an optimizer.
      Parameters:
         recurse (bool) -- if True, then yields parameters of
         this module and all submodules. Otherwise, yields only
         parameters that are direct members of this module.
      Yields:
         Parameter -- module parameter
      Return type:
         Iterator[Parameter]
      Example:
         >>> for param in model.parameters():
         >>>     print(type(param), param.size())
          (20L,)
          (20L, 1L, 5L, 5L)
   register_backward_hook(hook)
      Registers a backward hook on the module.
      This function is deprecated in favor of


This function is deprecated in favor of
      "register_full_backward_hook()" and the behavior of this
      function will change in future versions.
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemovableHandle"
   register_buffer(name, tensor, persistent=True)
      Adds a buffer to the module.
      This is typically used to register a buffer that should not to
      be considered a model parameter. For example, BatchNorm's
      "running_mean" is not a parameter, but is part of the module's
      state. Buffers, by default, are persistent and will be saved
      alongside parameters. This behavior can be changed by setting
      "persistent" to "False". The only difference between a
      persistent buffer and a non-persistent buffer is that the latter
      will not be a part of this module's "state_dict".
      Buffers can be accessed as attributes using given names.
      Parameters:


Parameters:
         * name (str) -- name of the buffer. The buffer can be
           accessed from this module using the given name
         * tensor (Tensor or None) -- buffer to be
           registered. If "None", then operations that run on buffers,
           such as "cuda", are ignored. If "None", the buffer is
           not included in the module's "state_dict".
         * persistent (bool) -- whether the buffer is part of
           this module's "state_dict".
      Example:
         >>> self.register_buffer('running_mean', torch.zeros(num_features))
   register_forward_hook(hook, *, prepend=False, with_kwargs=False)
      Registers a forward hook on the module.
      The hook will be called every time after "forward()" has
      computed an output.
      If "with_kwargs" is "False" or not specified, the input contains
      only the positional arguments given to the module. Keyword
      arguments won't be passed to the hooks and only to the


"forward". The hook can modify the output. It can modify the
      input inplace but it will not have effect on forward since this
      is called after "forward()" is called. The hook should have the
      following signature:
         hook(module, args, output) -> None or modified output
      If "with_kwargs" is "True", the forward hook will be passed the
      "kwargs" given to the forward function and be expected to return
      the output possibly modified. The hook should have the following
      signature:
         hook(module, args, kwargs, output) -> None or modified output
      Parameters:
         * hook (Callable) -- The user defined hook to be
           registered.
         * prepend (bool) -- If "True", the provided "hook" will
           be fired before all existing "forward" hooks on this
           "torch.nn.modules.Module". Otherwise, the provided "hook"
           will be fired after all existing "forward" hooks on this


"torch.nn.modules.Module". Note that global "forward" hooks
           registered with "register_module_forward_hook()" will fire
           before all hooks registered by this method. Default:
           "False"
         * with_kwargs (bool) -- If "True", the "hook" will be
           passed the kwargs given to the forward function. Default:
           "False"
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemovableHandle"
   register_forward_pre_hook(hook, *, prepend=False, with_kwargs=False)
      Registers a forward pre-hook on the module.
      The hook will be called every time before "forward()" is
      invoked.
      If "with_kwargs" is false or not specified, the input contains
      only the positional arguments given to the module. Keyword
      arguments won't be passed to the hooks and only to the
      "forward". The hook can modify the input. User can either return


a tuple or a single modified value in the hook. We will wrap the
      value into a tuple if a single value is returned (unless that
      value is already a tuple). The hook should have the following
      signature:
         hook(module, args) -> None or modified input
      If "with_kwargs" is true, the forward pre-hook will be passed
      the kwargs given to the forward function. And if the hook
      modifies the input, both the args and kwargs should be returned.
      The hook should have the following signature:
         hook(module, args, kwargs) -> None or a tuple of modified input and kwargs
      Parameters:
         * hook (Callable) -- The user defined hook to be
           registered.
         * prepend (bool) -- If true, the provided "hook" will
           be fired before all existing "forward_pre" hooks on this
           "torch.nn.modules.Module". Otherwise, the provided "hook"
           will be fired after all existing "forward_pre" hooks on


this "torch.nn.modules.Module". Note that global
           "forward_pre" hooks registered with
           "register_module_forward_pre_hook()" will fire before all
           hooks registered by this method. Default: "False"
         * with_kwargs (bool) -- If true, the "hook" will be
           passed the kwargs given to the forward function. Default:
           "False"
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemovableHandle"
   register_full_backward_hook(hook, prepend=False)
      Registers a backward hook on the module.
      The hook will be called every time the gradients with respect to
      a module are computed, i.e. the hook will execute if and only if
      the gradients with respect to module outputs are computed. The
      hook should have the following signature:
         hook(module, grad_input, grad_output) -> tuple(Tensor) or None


The "grad_input" and "grad_output" are tuples that contain the
      gradients with respect to the inputs and outputs respectively.
      The hook should not modify its arguments, but it can optionally
      return a new gradient with respect to the input that will be
      used in place of "grad_input" in subsequent computations.
      "grad_input" will only correspond to the inputs given as
      positional arguments and all kwarg arguments are ignored.
      Entries in "grad_input" and "grad_output" will be "None" for all
      non-Tensor arguments.
      For technical reasons, when this hook is applied to a Module,
      its forward function will receive a view of each Tensor passed
      to the Module. Similarly the caller will receive a view of each
      Tensor returned by the Module's forward function.
      Warning:
        Modifying inputs or outputs inplace is not allowed when using
        backward hooks and will raise an error.
      Parameters:


Parameters:
         * hook (Callable) -- The user-defined hook to be
           registered.
         * prepend (bool) -- If true, the provided "hook" will
           be fired before all existing "backward" hooks on this
           "torch.nn.modules.Module". Otherwise, the provided "hook"
           will be fired after all existing "backward" hooks on this
           "torch.nn.modules.Module". Note that global "backward"
           hooks registered with
           "register_module_full_backward_hook()" will fire before all
           hooks registered by this method.
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemovableHandle"
   register_full_backward_pre_hook(hook, prepend=False)
      Registers a backward pre-hook on the module.
      The hook will be called every time the gradients for the module
      are computed. The hook should have the following signature:


hook(module, grad_output) -> Tensor or None
      The "grad_output" is a tuple. The hook should not modify its
      arguments, but it can optionally return a new gradient with
      respect to the output that will be used in place of
      "grad_output" in subsequent computations. Entries in
      "grad_output" will be "None" for all non-Tensor arguments.
      For technical reasons, when this hook is applied to a Module,
      its forward function will receive a view of each Tensor passed
      to the Module. Similarly the caller will receive a view of each
      Tensor returned by the Module's forward function.
      Warning:
        Modifying inputs inplace is not allowed when using backward
        hooks and will raise an error.
      Parameters:
         * hook (Callable) -- The user-defined hook to be
           registered.
         * prepend (bool) -- If true, the provided "hook" will
           be fired before all existing "backward_pre" hooks on this


"torch.nn.modules.Module". Otherwise, the provided "hook"
           will be fired after all existing "backward_pre" hooks on
           this "torch.nn.modules.Module". Note that global
           "backward_pre" hooks registered with
           "register_module_full_backward_pre_hook()" will fire before
           all hooks registered by this method.
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemovableHandle"
   register_load_state_dict_post_hook(hook)
      Registers a post hook to be run after module's "load_state_dict"
      is called.
      It should have the following signature::
         hook(module, incompatible_keys) -> None
      The "module" argument is the current module that this hook is
      registered on, and the "incompatible_keys" argument is a
      "NamedTuple" consisting of attributes "missing_keys" and
      "unexpected_keys". "missing_keys" is a "list" of "str"


containing the missing keys and "unexpected_keys" is a "list" of
      "str" containing the unexpected keys.
      The given incompatible_keys can be modified inplace if needed.
      Note that the checks performed when calling "load_state_dict()"
      with "strict=True" are affected by modifications the hook makes
      to "missing_keys" or "unexpected_keys", as expected. Additions
      to either set of keys will result in an error being thrown when
      "strict=True", and clearing out both missing and unexpected keys
      will avoid an error.
      Returns:
         a handle that can be used to remove the added hook by calling
         "handle.remove()"
      Return type:
         "torch.utils.hooks.RemovableHandle"
   register_module(name, module)
      Alias for "add_module()".
   register_parameter(name, param)
      Adds a parameter to the module.
      The parameter can be accessed as an attribute using given name.
      Parameters:


Parameters:
         * name (str) -- name of the parameter. The parameter
           can be accessed from this module using the given name
         * param (Parameter or None) -- parameter to be
           added to the module. If "None", then operations that run on
           parameters, such as "cuda", are ignored. If "None", the
           parameter is not included in the module's "state_dict".
   register_state_dict_pre_hook(hook)
      These hooks will be called with arguments: "self", "prefix", and
      "keep_vars" before calling "state_dict" on "self". The
      registered hooks can be used to perform pre-processing before
      the "state_dict" call is made.
   requires_grad_(requires_grad=True)
      Change if autograd should record operations on parameters in
      this module.
      This method sets the parameters' "requires_grad" attributes in-
      place.
      This method is helpful for freezing part of the module for


finetuning or training parts of a model individually (e.g., GAN
      training).
      See Locally disabling gradient computation for a comparison
      between .requires_grad_() and several similar mechanisms that
      may be confused with it.
      Parameters:
         requires_grad (bool) -- whether autograd should record
         operations on parameters in this module. Default: "True".
      Returns:
         self
      Return type:
         Module
   set_extra_state(state)
      This function is called from "load_state_dict()" to handle any
      extra state found within the state_dict. Implement this
      function and a corresponding "get_extra_state()" for your module
      if you need to store extra state within its state_dict.
      Parameters:
         state (dict) -- Extra state from the state_dict
   share_memory()
      See "torch.Tensor.share_memory_()"
      Return type:
         T


Return type:
         T
   state_dict(, destination: T_destination, prefix: str = '', keep_vars: bool = False) -> T_destination
   state_dict(, prefix: str = '', keep_vars: bool = False) -> Dict[str, Any]
      Returns a dictionary containing references to the whole state of
      the module.
      Both parameters and persistent buffers (e.g. running averages)
      are included. Keys are corresponding parameter and buffer names.
      Parameters and buffers set to "None" are not included.
      Note:
        The returned object is a shallow copy. It contains references
        to the module's parameters and buffers.
      Warning:
        Currently "state_dict()" also accepts positional arguments for
        "destination", "prefix" and "keep_vars" in order. However,
        this is being deprecated and keyword arguments will be
        enforced in future releases.
      Warning:
        Please avoid the use of argument "destination" as it is not
        designed for end-users.
      Parameters:


designed for end-users.
      Parameters:
         * destination (dict, optional) -- If provided, the
           state of module will be updated into the dict and the same
           object is returned. Otherwise, an "OrderedDict" will be
           created and returned. Default: "None".
         * prefix (str, optional) -- a prefix added to
           parameter and buffer names to compose the keys in
           state_dict. Default: "''".
         * keep_vars (bool, optional) -- by default the
           "Tensor" s returned in the state dict are detached from
           autograd. If it's set to "True", detaching will not be
           performed. Default: "False".
      Returns:
         a dictionary containing a whole state of the module
      Return type:
         dict
      Example:
         >>> module.state_dict().keys()
         ['bias', 'weight']
   to(device: Optional[Union[int, device]] = ..., dtype: Optional[Union[dtype, str]] = ..., non_blocking: bool = ...) -> T


to(dtype: Union[dtype, str], non_blocking: bool = ...) -> T
   to(tensor: Tensor, non_blocking: bool = ...) -> T
      Moves and/or casts the parameters and buffers.
      This can be called as
      to(device=None, dtype=None, non_blocking=False)
      to(dtype, non_blocking=False)
      to(tensor, non_blocking=False)
      to(memory_format=torch.channels_last)
      Its signature is similar to "torch.Tensor.to()", but only
      accepts floating point or complex "dtype"s. In addition, this
      method will only cast the floating point or complex parameters
      and buffers to "dtype" (if given). The integral parameters and
      buffers will be moved "device", if that is given, but with
      dtypes unchanged. When "non_blocking" is set, it tries to
      convert/move asynchronously with respect to the host if
      possible, e.g., moving CPU Tensors with pinned memory to CUDA
      devices.
      See below for examples.
      Note:
        This method modifies the module in-place.
      Parameters:


Parameters:
         * device ("torch.device") -- the desired device of the
           parameters and buffers in this module
         * dtype ("torch.dtype") -- the desired floating point or
           complex dtype of the parameters and buffers in this module
         * tensor (torch.Tensor) -- Tensor whose dtype and
           device are the desired dtype and device for all parameters
           and buffers in this module
         * memory_format ("torch.memory_format") -- the desired
           memory format for 4D parameters and buffers in this module
           (keyword only argument)
      Returns:
         self
      Return type:
         Module
      Examples:
         >>> linear = nn.Linear(2, 2)
         >>> linear.weight
         Parameter containing:
         tensor([[ 0.1913, -0.3420],
                 [-0.5113, -0.2325]])
         >>> linear.to(torch.double)
         Linear(in_features=2, out_features=2, bias=True)
         >>> linear.weight
         Parameter containing:


Parameter containing:
         tensor([[ 0.1913, -0.3420],
                 [-0.5113, -0.2325]], dtype=torch.float64)
         >>> gpu1 = torch.device("cuda:1")
         >>> linear.to(gpu1, dtype=torch.half, non_blocking=True)
         Linear(in_features=2, out_features=2, bias=True)
         >>> linear.weight
         Parameter containing:
         tensor([[ 0.1914, -0.3420],
                 [-0.5112, -0.2324]], dtype=torch.float16, device='cuda:1')
         >>> cpu = torch.device("cpu")
         >>> linear.to(cpu)
         Linear(in_features=2, out_features=2, bias=True)
         >>> linear.weight
         Parameter containing:
         tensor([[ 0.1914, -0.3420],
                 [-0.5112, -0.2324]], dtype=torch.float16)
         >>> linear = nn.Linear(2, 2, bias=None).to(torch.cdouble)
         >>> linear.weight
         Parameter containing:
         tensor([[ 0.3741+0.j,  0.2382+0.j],
                 [ 0.5593+0.j, -0.4443+0.j]], dtype=torch.complex128)


linear(torch.ones(3, 2, dtype=torch.cdouble))
         tensor([[0.6122+0.j, 0.1150+0.j],
                 [0.6122+0.j, 0.1150+0.j],
                 [0.6122+0.j, 0.1150+0.j]], dtype=torch.complex128)
   to_empty(, device)
      Moves the parameters and buffers to the specified device without
      copying storage.
      Parameters:
         device ("torch.device") -- The desired device of the
         parameters and buffers in this module.
      Returns:
         self
      Return type:
         Module
   train(mode=True)
      Sets the module in training mode.
      This has any effect only on certain modules. See documentations
      of particular modules for details of their behaviors in
      training/evaluation mode, if they are affected, e.g. "Dropout",
      "BatchNorm", etc.
      Parameters:
         mode (bool*) -- whether to set training mode ("True") or
         evaluation mode ("False"). Default: "True".
      Returns:
         self
      Return type:
         Module


self
      Return type:
         Module
   type(dst_type)
      Casts all parameters and buffers to "dst_type".
      Note:
        This method modifies the module in-place.
      Parameters:
         dst_type (type or string) -- the desired type
      Returns:
         self
      Return type:
         Module
   xpu(device=None)
      Moves all model parameters and buffers to the XPU.
      This also makes associated parameters and buffers different
      objects. So it should be called before constructing optimizer if
      the module will live on XPU while being optimized.
      Note:
        This method modifies the module in-place.
      Parameters:
         device (int, optional) -- if specified, all
         parameters will be copied to that device
      Returns:
         self
      Return type:
         Module
   zero_grad(set_to_none=False)
      Sets gradients of all model parameters to zero. See similar
      function under "torch.optim.Optimizer" for more context.


Parameters:
         set_to_none (bool) -- instead of setting to zero, set
         the grads to None. See "torch.optim.Optimizer.zero_grad()"
         for details.


torch.meshgridtorch.meshgrid(tensors, indexing=None)
   Creates grids of coordinates specified by the 1D inputs in
   attr:tensors.
   This is helpful when you want to visualize data over some range of
   inputs. See below for a plotting example.
   Given N 1D tensors T_0 \ldots T_{N-1} as inputs with corresponding
   sizes S_0 \ldots S_{N-1}, this creates N N-dimensional tensors G_0
   \ldots G_{N-1}, each with shape (S_0, ..., S_{N-1}) where the
   output G_i is constructed by expanding T_i to the result shape.
   Note:
     0D inputs are treated equivalently to 1D inputs of a single
     element.
   Warning:
     torch.meshgrid(tensors) currently has the same behavior as
     calling numpy.meshgrid(arrays, indexing='ij').In the future
     torch.meshgrid will transition to indexing='xy'* as the
     default.https://github.com/pytorch/pytorch/issues/50276 tracks
     this issue with the goal of migrating to NumPy's behavior.
   See also:


See also:
     "torch.cartesian_prod()" has the same effect but it collects the
     data in a tensor of vectors.
   Parameters:
      * tensors (list of Tensor) -- list of scalars or 1
        dimensional tensors. Scalars will be treated as tensors of
        size (1,) automatically
      * indexing (Optional[str]) --
        (str, optional): the indexing mode, either "xy" or "ij",
        defaults to "ij". See warning for future changes.
        If "xy" is selected, the first dimension corresponds to the
        cardinality of the second input and the second dimension
        corresponds to the cardinality of the first input.
        If "ij" is selected, the dimensions are in the same order as
        the cardinality of the inputs.
   Returns:
      If the input has N tensors of size S_0 \ldots S_{N-1}`, then the
      output will also have N tensors, where each tensor is of shape
      (S_0, ..., S_{N-1}).
   Return type:
      seq (sequence of Tensors)
   Example:


seq (sequence of Tensors)
   Example:
      >>> x = torch.tensor([1, 2, 3])
      >>> y = torch.tensor([4, 5, 6])
      Observe the element-wise pairings across the grid, (1, 4),
      (1, 5), ..., (3, 6). This is the same thing as the
      cartesian product.
      >>> grid_x, grid_y = torch.meshgrid(x, y, indexing='ij')
      >>> grid_x
      tensor([[1, 1, 1],
              [2, 2, 2],
              [3, 3, 3]])
      >>> grid_y
      tensor([[4, 5, 6],
              [4, 5, 6],
              [4, 5, 6]])
      This correspondence can be seen when these grids are
      stacked properly.
      >>> torch.equal(torch.cat(tuple(torch.dstack([grid_x, grid_y]))),
      ...             torch.cartesian_prod(x, y))
      True
      torch.meshgrid is commonly used to produce a grid for
      plotting.
      >>> import matplotlib.pyplot as plt
      >>> xs = torch.linspace(-5, 5, steps=100)
      >>> ys = torch.linspace(-5, 5, steps=100)
      >>> x, y = torch.meshgrid(xs, ys, indexing='xy')


z = torch.sin(torch.sqrt(x * x + y * y))
      >>> ax = plt.axes(projection='3d')
      >>> ax.plot_surface(x.numpy(), y.numpy(), z.numpy())
      >>> plt.show()
   [image]


torch.nn.functional.dropout3dtorch.nn.functional.dropout3d(input, p=0.5, training=True, inplace=False)
   Randomly zero out entire channels (a channel is a 3D feature map,
   e.g., the j-th channel of the i-th sample in the batched input is a
   3D tensor \text{input}[i, j]) of the input tensor). Each channel
   will be zeroed out independently on every forward call with
   probability "p" using samples from a Bernoulli distribution.
   See "Dropout3d" for details.
   Parameters:
      * p (float) -- probability of a channel to be zeroed.
        Default: 0.5
      * training (bool) -- apply dropout if is "True". Default:
        "True"
      * inplace (bool) -- If set to "True", will do this
        operation in-place. Default: "False"
   Return type:
      Tensor


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


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


"size_average" and "reduce" are in the process of being
        deprecated, and in the meantime, specifying either of those
        two args will override "reduction". Default: "'mean'"
   Shape:
      * Input: (), where * means any number of dimensions.
      * Target: (), same shape as the input.
   Examples:
      >>> loss = nn.MSELoss()
      >>> input = torch.randn(3, 5, requires_grad=True)
      >>> target = torch.randn(3, 5)
      >>> output = loss(input, target)
      >>> output.backward()


torch.seedtorch.seed()
   Sets the seed for generating random numbers to a non-deterministic
   random number. Returns a 64 bit number used to seed the RNG.
   Return type:
      int


torch.linalg.eightorch.linalg.eigh(A, UPLO='L', , out=None)
   Computes the eigenvalue decomposition of a complex Hermitian or
   real symmetric matrix.
   Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, the eigenvalue
   decomposition* of a complex Hermitian or real symmetric matrix A
   \in \mathbb{K}^{n \times n} is defined as
      A = Q \operatorname{diag}(\Lambda) Q^{\text{H}}\mathrlap{\qquad
      Q \in \mathbb{K}^{n \times n}, \Lambda \in \mathbb{R}^n}
   where Q^{\text{H}} is the conjugate transpose when Q is complex,
   and the transpose when Q is real-valued. Q is orthogonal in the
   real case and unitary in the complex case.
   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.
   "A" is assumed to be Hermitian (resp. symmetric), but this is not
   checked internally, instead:


checked internally, instead:
   * If "UPLO"= 'L' (default), only the lower triangular part of the
     matrix is used in the computation.
   * If "UPLO"= 'U', only the upper triangular part of the matrix is
     used.
   The eigenvalues are returned in ascending order.
   Note:
     When inputs are on a CUDA device, this function synchronizes that
     device with the CPU.
   Note:
     The eigenvalues of real symmetric or complex Hermitian matrices
     are always real.
   Warning:
     The eigenvectors of a symmetric matrix are not unique, nor are
     they continuous with respect to "A". Due to this lack of
     uniqueness, different hardware and software may compute different
     eigenvectors.This non-uniqueness is caused by the fact that
     multiplying an eigenvector by -1 in the real case or by e^{i
     \phi}, \phi \in \mathbb{R} in the complex case produces another
     set of valid eigenvectors of the matrix. For this reason, the


loss function shall not depend on the phase of the eigenvectors,
     as this quantity is not well-defined. This is checked for complex
     inputs when computing the gradients of this function. As such,
     when inputs are complex and are on a CUDA device, the computation
     of the gradients of this function synchronizes that device with
     the CPU.
   Warning:
     Gradients computed using the eigenvectors tensor will only be
     finite when "A" has distinct eigenvalues. Furthermore, if the
     distance between any two eigenvalues is close to zero, the
     gradient will be numerically unstable, as it depends on the
     eigenvalues \lambda_i through the computation of \frac{1}{\min_{i
     \neq j} \lambda_i - \lambda_j}.
   See also:
     "torch.linalg.eigvalsh()" computes only the eigenvalues of a
     Hermitian matrix. Unlike "torch.linalg.eigh()", the gradients of
     "eigvalsh()" are always numerically stable.
     "torch.linalg.cholesky()" for a different decomposition of a


Hermitian matrix. The Cholesky decomposition gives less
     information about the matrix but is much faster to compute than
     the eigenvalue decomposition.
     "torch.linalg.eig()" for a (slower) function that computes the
     eigenvalue decomposition of a not necessarily Hermitian square
     matrix.
     "torch.linalg.svd()" for a (slower) function that computes the
     more general SVD decomposition of matrices of any shape.
     "torch.linalg.qr()" for another (much faster) decomposition that
     works on general matrices.
   Parameters:
      * A (Tensor) -- tensor of shape (, n, n) where *** is
        zero or more batch dimensions consisting of symmetric or
        Hermitian matrices.
      * UPLO ('L', 'U', optional) -- controls whether to
        use the upper or lower triangular part of "A" in the
        computations. Default: 'L'.
   Keyword Arguments:
      out (tuple, optional*) -- output tuple of two tensors.


Ignored if None. Default: None.
   Returns:
      A named tuple (eigenvalues, eigenvectors) which corresponds to
      \Lambda and Q above.
      eigenvalues will always be real-valued, even when "A" is
      complex. It will also be ordered in ascending order.
      eigenvectors will have the same dtype as "A" and will contain
      the eigenvectors as its columns.
   Examples::
      >>> A = torch.randn(2, 2, dtype=torch.complex128)
      >>> A = A + A.T.conj()  # creates a Hermitian matrix
      >>> A
      tensor([[2.9228+0.0000j, 0.2029-0.0862j],
              [0.2029+0.0862j, 0.3464+0.0000j]], dtype=torch.complex128)
      >>> L, Q = torch.linalg.eigh(A)
      >>> L
      tensor([0.3277, 2.9415], dtype=torch.float64)
      >>> Q
      tensor([[-0.0846+-0.0000j, -0.9964+0.0000j],
              [ 0.9170+0.3898j, -0.0779-0.0331j]], dtype=torch.complex128)
      >>> torch.dist(Q @ torch.diag(L.cdouble()) @ Q.T.conj(), A)
      tensor(6.1062e-16, dtype=torch.float64)


tensor(6.1062e-16, dtype=torch.float64)
      >>> A = torch.randn(3, 2, 2, dtype=torch.float64)
      >>> A = A + A.mT  # creates a batch of symmetric matrices
      >>> L, Q = torch.linalg.eigh(A)
      >>> torch.dist(Q @ torch.diag_embed(L) @ Q.mH, A)
      tensor(1.5423e-15, dtype=torch.float64)


torch.Tensor.index_fillTensor.index_fill(dim, index, value) -> Tensor
   Out-of-place version of "torch.Tensor.index_fill_()".


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


torch.autograd.forward_ad.unpack_dualtorch.autograd.forward_ad.unpack_dual(tensor, *, level=None)
   Unpacks a "dual tensor" to get both its Tensor value and its
   forward AD gradient. The result is a namedtuple "(primal, tangent)"
   where "primal" is a view of "tensor"'s primal and "tangent" is
   "tensor"'s tangent as-is. Neither of these tensors can be dual
   tensor of level "level".
   This function is backward differentiable.
   Example:
      >>> with dual_level():
      ...     inp = make_dual(x, x_t)
      ...     out = f(inp)
      ...     y, jvp = unpack_dual(out)
      ...     jvp = unpack_dual(out).tangent
   Please see the forward-mode AD tutorial for detailed steps on how
   to use this API.


torch.nn.functional.normalizetorch.nn.functional.normalize(input, p=2.0, dim=1, eps=1e-12, out=None)
   Performs L_p normalization of inputs over specified dimension.
   For a tensor "input" of sizes (n_0, ..., n_{dim}, ..., n_k), each
   n_{dim} -element vector v along dimension "dim" is transformed as
      v = \frac{v}{\max(\lVert v \rVert_p, \epsilon)}.
   With the default arguments it uses the Euclidean norm over vectors
   along dimension 1 for normalization.
   Parameters:
      * input (Tensor) -- input tensor of any shape
      * p (float) -- the exponent value in the norm formulation.
        Default: 2
      * dim (int) -- the dimension to reduce. Default: 1
      * eps (float) -- small value to avoid division by zero.
        Default: 1e-12
      * out (Tensor, optional) -- the output tensor. If
        "out" is used, this operation won't be differentiable.
   Return type:
      Tensor


torch.nn.functional.conv3dtorch.nn.functional.conv3d(input, weight, bias=None, stride=1, padding=0, dilation=1, groups=1) -> Tensor
   Applies a 3D convolution over an input image composed of several
   input planes.
   This operator supports TensorFloat32.
   See "Conv3d" for details and output shape.
   Note:
     In some circumstances when given tensors on a CUDA device and
     using CuDNN, this operator may select a nondeterministic
     algorithm to increase performance. If this is undesirable, you
     can try to make the operation deterministic (potentially at a
     performance cost) by setting "torch.backends.cudnn.deterministic
     = True". See Reproducibility for more information.
   Note:
     This operator supports complex data types i.e. "complex32,
     complex64, complex128".
   Parameters:
      * input -- input tensor of shape (\text{minibatch} ,
        \text{in_channels} , iT , iH , iW)
      * weight -- filters of shape (\text{out_channels} ,


\frac{\text{in_channels}}{\text{groups}} , kT , kH , kW)
      * bias -- optional bias tensor of shape
        (\text{out_channels}). Default: None
      * stride -- the stride of the convolving kernel. Can be a
        single number or a tuple (sT, sH, sW). Default: 1
      * padding --
        implicit paddings on both sides of the input. Can be a string
        {'valid', 'same'}, single number or a tuple (padT, padH,
        padW). Default: 0 "padding='valid'" is the same as no
        padding. "padding='same'" pads the input so the output has the
        same shape as the input. However, this mode doesn't support
        any stride values other than 1.
        Warning:
          For "padding='same'", if the "weight" is even-length and
          "dilation" is odd in any dimension, a full "pad()" operation
          may be needed internally. Lowering performance.
      * dilation -- the spacing between kernel elements. Can be a


single number or a tuple (dT, dH, dW). Default: 1
      * groups -- split input into groups, \text{in_channels}
        should be divisible by the number of groups. Default: 1
   Examples:
      >>> filters = torch.randn(33, 16, 3, 3, 3)
      >>> inputs = torch.randn(20, 16, 50, 10, 20)
      >>> F.conv3d(inputs, filters)


torch.Tensor.is_sparseTensor.is_sparse
   Is "True" if the Tensor uses sparse storage layout, "False"
   otherwise.


ReplicationPad3dclass torch.nn.ReplicationPad3d(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 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.ReplicationPad3d(3)


Examples:
      >>> m = nn.ReplicationPad3d(3)
      >>> input = torch.randn(16, 3, 8, 320, 480)
      >>> output = m(input)
      >>> # using different paddings for different sides
      >>> m = nn.ReplicationPad3d((3, 3, 6, 6, 1, 1))
      >>> output = m(input)


torch.nn.functional.gaussian_nll_losstorch.nn.functional.gaussian_nll_loss(input, target, var, full=False, eps=1e-06, reduction='mean')
   Gaussian negative log likelihood loss.
   See "GaussianNLLLoss" for details.
   Parameters:
      * input (Tensor) -- expectation of the Gaussian
        distribution.
      * target (Tensor) -- sample from the Gaussian
        distribution.
      * var (Tensor) -- tensor of positive variance(s), one for
        each of the expectations in the input (heteroscedastic), or a
        single one (homoscedastic).
      * full (bool, optional) -- include the constant term
        in the loss calculation. Default: "False".
      * eps (float, optional) -- value added to var, for
        stability. Default: 1e-6.
      * reduction (str, optional) -- specifies the reduction
        to apply to the output: "'none'" | "'mean'" | "'sum'".


"'none'": no reduction will be applied, "'mean'": the output
        is the average of all batch member losses, "'sum'": the output
        is the sum of all batch member losses. Default: "'mean'".
   Return type:
      Tensor


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


torch.fractorch.frac(input, *, out=None) -> Tensor
   Computes the fractional portion of each element in "input".
      \text{out}{i} = \text{input} - \left\lfloor
      |\text{input}{i}| \right\rfloor *
      \operatorname{sgn}(\text{input})
   Example:
      >>> torch.frac(torch.tensor([1, 2.5, -3.2]))
      tensor([ 0.0000,  0.5000, -0.2000])


adaptive_avg_pool3dclass torch.ao.nn.quantized.functional.adaptive_avg_pool3d(input, output_size)
   Applies a 3D adaptive average pooling over a quantized input signal
   composed of several quantized input planes.
   Note:
     The input quantization parameters propagate to the output.
   See "AdaptiveAvgPool3d" for details and output shape.
   Parameters:
      output_size (None) -- the target output size (single
      integer or double-integer tuple)
   Return type:
      Tensor


torch.smmtorch.smm(input, mat) -> Tensor
   Performs a matrix multiplication of the sparse matrix "input" with
   the dense matrix "mat".
   Parameters:
      * input (Tensor) -- a sparse matrix to be matrix
        multiplied
      * mat (Tensor) -- a dense matrix to be matrix multiplied


torch.Tensor.erfTensor.erf() -> Tensor
   See "torch.erf()"


torch.fft.rfftfreqtorch.fft.rfftfreq(n, d=1.0, , out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
   Computes the sample frequencies for "rfft()" with a signal of size
   "n".
   Note:
     "rfft()" returns Hermitian one-sided output, so only the positive
     frequency terms are returned. For a real FFT of length "n" and
     with inputs spaced in length unit "d", the frequencies are:
        f = torch.arange((n + 1) // 2) / (d * n)
   Note:
     For even lengths, the Nyquist frequency at "f[n/2]" can be
     thought of as either negative or positive. Unlike "fftfreq()",
     "rfftfreq()" always returns it as positive.
   Parameters:
      * n (int) -- the real FFT length
      * d (float, optional*) -- The sampling length scale.
        The spacing between individual samples of the FFT input. The
        default assumes unit spacing, dividing that result by the
        actual spacing gives the result in physical frequency units.


Keyword Arguments:
      * out (Tensor, optional) -- the output tensor.
      * dtype ("torch.dtype", optional) -- the desired data type
        of returned tensor. Default: if "None", uses a global default
        (see "torch.set_default_tensor_type()").
      * layout ("torch.layout", optional) -- the desired layout of
        returned Tensor. Default: "torch.strided".
      * device ("torch.device", optional) -- the desired device of
        returned tensor. Default: if "None", uses the current device
        for the default tensor type (see
        "torch.set_default_tensor_type()"). "device" will be the CPU
        for CPU tensor types and the current CUDA device for CUDA
        tensor types.
      * requires_grad (bool, optional) -- If autograd should
        record operations on the returned tensor. Default: "False".
   -[ Example ]-

torch.fft.rfftfreq(5)
   tensor([0.0000, 0.2000, 0.4000])
torch.fft.rfftfreq(4)
   tensor([0.0000, 0.2500, 0.5000])


tensor([0.0000, 0.2500, 0.5000])
   Compared to the output from "fftfreq()", we see that the Nyquist
   frequency at "f[2]" has changed sign: >>> torch.fft.fftfreq(4)
   tensor([ 0.0000,  0.2500, -0.5000, -0.2500])


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


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


for details.  Default: "False"
      * dropout -- If non-zero, introduces a Dropout layer on
        the outputs of each GRU layer except the last layer, with
        dropout probability equal to "dropout". Default: 0
      * bidirectional -- If "True", becomes a bidirectional GRU.
        Default: "False"
   Inputs: input, h_0
      * input: tensor of shape (L, H_{in}) for unbatched input,
        (L, N, H_{in}) when "batch_first=False" or (N, L, H_{in}) when
        "batch_first=True" containing the features of the input
        sequence.  The input can also be a packed variable length
        sequence. See "torch.nn.utils.rnn.pack_padded_sequence()" or
        "torch.nn.utils.rnn.pack_sequence()" for details.
      * h_0: tensor of shape (D * \text{num_layers}, H_{out}) or
        (D * \text{num_layers}, N, H_{out}) containing the initial
        hidden state for the input sequence. Defaults to zeros if not
        provided.
      where:


provided.
      where:
         \begin{aligned}     N ={} & \text{batch size} \     L ={} &
         \text{sequence length} \     D ={} & 2 \text{ if
         bidirectional=True otherwise } 1 \     H_{in} ={} &
         \text{input_size} \     H_{out} ={} & \text{hidden_size}
         \end{aligned}
   Outputs: output, h_n
      * output: tensor of shape (L, D * H_{out}) for unbatched
        input, (L, N, D * H_{out}) when "batch_first=False" or (N, L,
        D * H_{out}) when "batch_first=True" containing the output
        features (h_t) from the last layer of the GRU, for each t.
        If a "torch.nn.utils.rnn.PackedSequence" has been given as the
        input, the output will also be a packed sequence.
      * h_n: tensor of shape (D * \text{num_layers}, H_{out}) or
        (D * \text{num_layers}, N, H_{out}) containing the final
        hidden state for the input sequence.
   Variables:
      * weight_ih_l[k] -- the learnable input-hidden weights of


the \text{k}^{th} layer (W_ir|W_iz|W_in), of shape
        (3hidden_size, input_size) for k = 0. Otherwise, the
        shape is (3hidden_size, num_directions * hidden_size)
      * weight_hh_l[k] -- the learnable hidden-hidden weights of
        the \text{k}^{th} layer (W_hr|W_hz|W_hn), of shape
        (3hidden_size, hidden_size)
      * bias_ih_l[k] -- the learnable input-hidden bias of the
        \text{k}^{th} layer (b_ir|b_iz|b_in), of shape
        (3hidden_size)
      * bias_hh_l[k] -- the learnable hidden-hidden bias of the
        \text{k}^{th} layer (b_hr|b_hz|b_hn), of shape
        (3hidden_size)*
   Note:
     All the weights and biases are initialized from
     \mathcal{U}(-\sqrt{k}, \sqrt{k}) where k =
     \frac{1}{\text{hidden_size}}
   Note:
     For bidirectional GRUs, forward and backward are directions 0 and
     1 respectively. Example of splitting the output layers when
     "batch_first=False": "output.view(seq_len, batch, num_directions,


hidden_size)".
   Note:
     "batch_first" argument is ignored for unbatched inputs.
   Note:
     If the following conditions are satisfied: 1) cudnn is enabled,
     2) input data is on the GPU 3) input data has dtype
     "torch.float16" 4) V100 GPU is used, 5) input data is not in
     "PackedSequence" format persistent algorithm can be selected to
     improve performance.
   Examples:
      >>> rnn = nn.GRU(10, 20, 2)
      >>> input = torch.randn(5, 3, 10)
      >>> h0 = torch.randn(2, 3, 20)
      >>> output, hn = rnn(input, h0)


SequentialLRclass torch.optim.lr_scheduler.SequentialLR(optimizer, schedulers, milestones, last_epoch=- 1, verbose=False)
   Receives the list of schedulers that is expected to be called
   sequentially during optimization process and milestone points that
   provides exact intervals to reflect which scheduler is supposed to
   be called at a given epoch.
   Parameters:
      * optimizer (Optimizer) -- Wrapped optimizer.
      * schedulers (list) -- List of chained schedulers.
      * milestones (list) -- List of integers that reflects
        milestone points.
      * last_epoch (int) -- The index of last epoch. Default:
        -1.
      * verbose (bool) -- Does nothing.
   -[ Example ]-

Assuming optimizer uses lr = 1. for all groups
lr = 0.1     if epoch == 0
lr = 0.1     if epoch == 1
lr = 0.9     if epoch == 2
lr = 0.81    if epoch == 3
lr = 0.729   if epoch == 4


lr = 0.729   if epoch == 4
scheduler1 = ConstantLR(self.opt, factor=0.1, total_iters=2)
scheduler2 = ExponentialLR(self.opt, gamma=0.9)
scheduler = SequentialLR(self.opt, schedulers=[scheduler1, scheduler2], milestones=[2])
for epoch in range(100):
    train(...)
    validate(...)
    scheduler.step()
   get_last_lr()
      Return last computed learning rate by current scheduler.
   load_state_dict(state_dict)
      Loads the schedulers state.
      Parameters:
         state_dict (dict) -- scheduler state. Should be an
         object returned from a call to "state_dict()".
   print_lr(is_verbose, group, lr, epoch=None)
      Display the current learning rate.
   state_dict()
      Returns the state of the scheduler as a "dict".
      It contains an entry for every variable in self.dict which
      is not the optimizer. The wrapped scheduler states will also be
      saved.


torch.Tensor.argwhereTensor.argwhere() -> Tensor
   See "torch.argwhere()"


torch.Tensor.addcdivTensor.addcdiv(tensor1, tensor2, *, value=1) -> Tensor
   See "torch.addcdiv()"


torch.floor_dividetorch.floor_divide(input, other, , out=None) -> Tensor
   Note:
     Before PyTorch 1.13 "torch.floor_divide()" incorrectly performed
     truncation division. To restore the previous behavior use
     "torch.div()" with "rounding_mode='trunc'".
   Computes "input" divided by "other", elementwise, and floors the
   result.
      \text{{out}}_i = \text{floor} \left(
      \frac{{\text{{input}}_i}}{{\text{{other}}_i}} \right)
   Supports broadcasting to a common shape, type promotion, and
   integer and float inputs.
   Parameters:
      * input (Tensor or Number) -- the dividend
      * other (Tensor or Number) -- the divisor
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.tensor([4.0, 3.0])
      >>> b = torch.tensor([2.0, 2.0])
      >>> torch.floor_divide(a, b)
      tensor([2.0, 1.0])
      >>> torch.floor_divide(a, 1.4)
      tensor([2.0, 2.0])


torch.get_float32_matmul_precisiontorch.get_float32_matmul_precision()
   Returns the current value of float32 matrix multiplication
   precision. Refer to "torch.set_float32_matmul_precision()"
   documentation for more details.
   Return type:
      str


prepare_qat_fxclass torch.quantization.quantize_fx.prepare_qat_fx(model, qconfig_mapping, example_inputs, prepare_custom_config=None, backend_config=None)
   Prepare a model for quantization aware training
   Parameters:
      * model () -- torch.nn.Module model
      * *qconfig_mapping () -- see "prepare_fx()"
      * *example_inputs () -- see "prepare_fx()"
      * *prepare_custom_config () -- see "prepare_fx()"
      * *backend_config (*) -- see "prepare_fx()"
   Returns:
      A GraphModule with fake quant modules (configured by
      qconfig_mapping and backend_config), ready for quantization
      aware training
   Return type:
      ObservedGraphModule
   Example:
      import torch
      from torch.ao.quantization import get_default_qat_qconfig_mapping
      from torch.ao.quantization import prepare_fx
      class Submodule(torch.nn.Module):
          def init(self):
              super().init()
              self.linear = torch.nn.Linear(5, 5)


self.linear = torch.nn.Linear(5, 5)
          def forward(self, x):
              x = self.linear(x)
              return x
      class M(torch.nn.Module):
          def init(self):
              super().init()
              self.linear = torch.nn.Linear(5, 5)
              self.sub = Submodule()
          def forward(self, x):
              x = self.linear(x)
              x = self.sub(x) + x
              return x
      # initialize a floating point model
      float_model = M().train()
      # (optional, but preferred) load the weights from pretrained model
      # float_model.load_weights(...)
      # define the training loop for quantization aware training
      def train_loop(model, train_data):
          model.train()
          for image, target in data_loader:
              ...
      # qconfig is the configuration for how we insert observers for a particular
      # operator
      # qconfig = get_default_qconfig("fbgemm")
      # Example of customizing qconfig:


Example of customizing qconfig:
  # qconfig = torch.ao.quantization.QConfig(
  #    activation=FakeQuantize.with_args(observer=MinMaxObserver.with_args(dtype=torch.qint8)),
  #    weight=FakeQuantize.with_args(observer=MinMaxObserver.with_args(dtype=torch.qint8)))
  # `activation` and `weight` are constructors of observer module
  # qconfig_mapping is a collection of quantization configurations, user can
  # set the qconfig for each operator (torch op calls, functional calls, module calls)
  # in the model through qconfig_mapping
  # the following call will get the qconfig_mapping that works best for models
  # that target "fbgemm" backend
  qconfig_mapping = get_default_qat_qconfig("fbgemm")
  # We can customize qconfig_mapping in different ways, please take a look at
  # the docstring for :func:`~torch.ao.quantization.prepare_fx` for different ways
  # to configure this


to configure this
  # example_inputs is a tuple of inputs, that is used to infer the type of the
  # outputs in the model
  # currently it's not used, but please make sure model(*example_inputs) runs
  example_inputs = (torch.randn(1, 3, 224, 224),)
  # TODO: add backend_config after we split the backend_config for fbgemm and qnnpack
  # e.g. backend_config = get_default_backend_config("fbgemm")
  # `prepare_qat_fx` inserts observers in the model based on qconfig_mapping and
  # backend_config, if the configuration for an operator in qconfig_mapping
  # is supported in the backend_config (meaning it's supported by the target
  # hardware), we'll insert fake_quantize modules according to the qconfig_mapping
  # otherwise the configuration in qconfig_mapping will be ignored
  # see :func:`~torch.ao.quantization.prepare_fx` for a detailed explanation of
  # how qconfig_mapping interacts with backend_config


prepared_model = prepare_qat_fx(float_model, qconfig_mapping, example_inputs)
      # Run training
      train_loop(prepared_model, train_loop)


torch.Tensor.stdTensor.std(dim=None, *, correction=1, keepdim=False) -> Tensor
   See "torch.std()"


BNReLU3dclass torch.ao.nn.intrinsic.quantized.BNReLU3d(num_features, eps=1e-05, momentum=0.1, device=None, dtype=None)
   A BNReLU3d module is a fused module of BatchNorm3d and ReLU
   We adopt the same interface as "torch.ao.nn.quantized.BatchNorm3d".
   Variables:
      torch.ao.nn.quantized.BatchNorm3d (Same as) --


torch.Tensor.sign_Tensor.sign_() -> Tensor
   In-place version of "sign()"


torch.Tensor.floorTensor.floor() -> Tensor
   See "torch.floor()"


torch.normaltorch.normal(mean, std, , generator=None, out=None) -> Tensor
   Returns a tensor of random numbers drawn from separate normal
   distributions whose mean and standard deviation are given.
   The "mean" is a tensor with the mean of each output element's
   normal distribution
   The "std" is a tensor with the standard deviation of each output
   element's normal distribution
   The shapes of "mean" and "std" don't need to match, but the total
   number of elements in each tensor need to be the same.
   Note:
     When the shapes do not match, the shape of "mean" is used as the
     shape for the returned output tensor
   Note:
     When "std" is a CUDA tensor, this function synchronizes its
     device with the CPU.
   Parameters:
      * mean (Tensor) -- the tensor of per-element means
      * std (Tensor) -- the tensor of per-element standard
        deviations
   Keyword Arguments:
      * generator* ("torch.Generator", optional) -- a pseudorandom


number generator for sampling
      * out (Tensor, optional) -- the output tensor.
   Example:
      >>> torch.normal(mean=torch.arange(1., 11.), std=torch.arange(1, 0, -0.1))
      tensor([  1.0425,   3.5672,   2.7969,   4.2925,   4.7229,   6.2134,
                8.0505,   8.1408,   9.0563,  10.0566])
   torch.normal(mean=0.0, std, , out=None) -> Tensor
   Similar to the function above, but the means are shared among all
   drawn elements.
   Parameters:
      * mean (float, optional) -- the mean for all
        distributions
      * std (Tensor) -- the tensor of per-element standard
        deviations
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
   Example:
      >>> torch.normal(mean=0.5, std=torch.arange(1., 6.))
      tensor([-1.2793, -1.0732, -2.0687,  5.1177, -1.2303])
   torch.normal(mean, std=1.0, , out=None) -> Tensor
   Similar to the function above, but the standard deviations are
   shared among all drawn elements.


shared among all drawn elements.
   Parameters:
      * mean (Tensor) -- the tensor of per-element means
      * std (float, optional) -- the standard deviation for
        all distributions
   Keyword Arguments:
      out (Tensor, optional) -- the output tensor
   Example:
      >>> torch.normal(mean=torch.arange(1., 6.))
      tensor([ 1.1552,  2.6148,  2.6535,  5.8318,  4.2361])
   torch.normal(mean, std, size, , out=None) -> Tensor
   Similar to the function above, but the means and standard
   deviations are shared among all drawn elements. The resulting
   tensor has size given by "size".
   Parameters:
      * mean (float) -- the mean for all distributions
      * std (float) -- the standard deviation for all
        distributions
      * size (int...*) -- a sequence of integers defining the
        shape of the output tensor.
   Keyword Arguments:
      out (*Tensor, *optional) -- the output tensor.
   Example:


Example:
      >>> torch.normal(2, 3, size=(1, 4))
      tensor([[-1.3987, -1.9544,  3.6048,  0.7909]])


RNNCellclass torch.ao.nn.quantized.dynamic.RNNCell(input_size, hidden_size, bias=True, nonlinearity='tanh', dtype=torch.qint8)
   An Elman RNN cell with tanh or ReLU non-linearity. A dynamic
   quantized RNNCell module with floating point tensor as inputs and
   outputs. Weights are quantized to 8 bits. We adopt the same
   interface as torch.nn.RNNCell, please see
   https://pytorch.org/docs/stable/nn.html#torch.nn.RNNCell for
   documentation.
   Examples:
      >>> rnn = nn.RNNCell(10, 20)
      >>> input = torch.randn(6, 3, 10)
      >>> hx = torch.randn(3, 20)
      >>> output = []
      >>> for i in range(6):
      ...     hx = rnn(input[i], hx)
      ...     output.append(hx)


torch.Tensor.cpuTensor.cpu(memory_format=torch.preserve_format) -> Tensor
   Returns a copy of this object in CPU memory.
   If this object is already in CPU memory and on the correct device,
   then no copy is performed and the original object is returned.
   Parameters:
      memory_format ("torch.memory_format", optional) -- the
      desired memory format of returned Tensor. Default:
      "torch.preserve_format".


torch.selecttorch.select(input, dim, index) -> Tensor
   Slices the "input" tensor along the selected dimension at the given
   index. This function returns a view of the original tensor with the
   given dimension removed.
   Note:
     If "input" is a sparse tensor and returning a view of the tensor
     is not possible, a RuntimeError exception is raised. In this is
     the case, consider using "torch.select_copy()" function.
   Parameters:
      * input (Tensor) -- the input tensor.
      * dim (int) -- the dimension to slice
      * index (int) -- the index to select with
   Note:
     "select()" is equivalent to slicing. For example,
     "tensor.select(0, index)" is equivalent to "tensor[index]" and
     "tensor.select(2, index)" is equivalent to "tensor[:,:,index]".


torch.cuda.current_blas_handletorch.cuda.current_blas_handle()
   Returns cublasHandle_t pointer to current cuBLAS handle


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


torch.Tensor.erfcTensor.erfc() -> Tensor
   See "torch.erfc()"


torch.Tensor.absTensor.abs() -> Tensor
   See "torch.abs()"


torch.Tensor.scatterTensor.scatter(dim, index, src) -> Tensor
   Out-of-place version of "torch.Tensor.scatter_()"


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


torch.from_dlpacktorch.from_dlpack(ext_tensor) -> Tensor
   Converts a tensor from an external library into a "torch.Tensor".
   The returned PyTorch tensor will share the memory with the input
   tensor (which may have come from another library). Note that in-
   place operations will therefore also affect the data of the input
   tensor. This may lead to unexpected issues (e.g., other libraries
   may have read-only flags or immutable data structures), so the user
   should only do this if they know for sure that this is fine.
   Parameters:
      ext_tensor (object with "dlpack" attribute, or a DLPack
      capsule) --
      The tensor or DLPack capsule to convert.
      If "ext_tensor" is a tensor (or ndarray) object, it must support
      the "dlpack" protocol (i.e., have a "ext_tensor.dlpack"
      method). Otherwise "ext_tensor" may be a DLPack capsule, which
      is an opaque "PyCapsule" instance, typically produced by a
      "to_dlpack" function or method.


"to_dlpack" function or method.
   Return type:
      Tensor
   Examples:
      >>> import torch.utils.dlpack
      >>> t = torch.arange(4)
      # Convert a tensor directly (supported in PyTorch >= 1.10)
      >>> t2 = torch.from_dlpack(t)
      >>> t2[:2] = -1  # show that memory is shared
      >>> t2
      tensor([-1, -1,  2,  3])
      >>> t
      tensor([-1, -1,  2,  3])
      # The old-style DLPack usage, with an intermediate capsule object
      >>> capsule = torch.utils.dlpack.to_dlpack(t)
      >>> capsule

      >>> t3 = torch.from_dlpack(capsule)
      >>> t3
      tensor([-1, -1,  2,  3])
      >>> t3[0] = -9  # now we're sharing memory between 3 tensors
      >>> t3
      tensor([-9, -1,  2,  3])
      >>> t2
      tensor([-9, -1,  2,  3])
      >>> t
      tensor([-9, -1,  2,  3])


torch.Tensor.is_set_toTensor.is_set_to(tensor) -> bool
   Returns True if both tensors are pointing to the exact same memory
   (same storage, offset, size and stride).


DTypeWithConstraintsclass torch.ao.quantization.backend_config.DTypeWithConstraints(dtype=None, quant_min_lower_bound=None, quant_max_upper_bound=None, scale_min_lower_bound=None, scale_max_upper_bound=None, scale_exact_match=None, zero_point_exact_match=None)
   Config for specifying additional constraints for a given dtype,
   such as quantization value ranges, scale value ranges, and fixed
   quantization params, to be used in "DTypeConfig".
   The constraints currently supported are:
   * quant_min_lower_bound and quant_max_upper_bound: Lower and
     upper bounds for the minimum and maximum quantized values
     respectively. If the QConfigâs quant_min and quant_max fall
     outside this range, then the QConfig will be ignored.
   * scale_min_lower_bound and scale_max_upper_bound: Lower and
     upper bounds for the minimum and maximum scale values
     respectively. If the QConfigâs minimum scale value (currently


exposed as eps) falls below the lower bound, then the QConfig
     will be ignored. Note that the upper bound is currently not
     enforced.
   * scale_exact_match and zero_point_exact_match: Exact match
     requirements for scale and zero point, to be used for operators
     with fixed quantization parameters such as sigmoid and tanh. If
     the observer specified in the QConfig is neither
     FixedQParamsObserver nor FixedQParamsFakeQuantize, or if the
     quantization parameters don't match, then the QConfig will be
     ignored.


Hardtanhclass torch.nn.Hardtanh(min_val=- 1.0, max_val=1.0, inplace=False, min_value=None, max_value=None)
   Applies the HardTanh function element-wise.
   HardTanh is defined as:
      \text{HardTanh}(x) = \begin{cases}     \text{max_val} & \text{
      if } x > \text{ max_val } \     \text{min_val} & \text{ if }
      x < \text{ min_val } \     x & \text{ otherwise } \
      \end{cases}
   Parameters:
      * min_val (float) -- minimum value of the linear region
        range. Default: -1
      * max_val (float) -- maximum value of the linear region
        range. Default: 1
      * inplace (bool) -- can optionally do the operation in-
        place. Default: "False"
   Keyword arguments "min_value" and "max_value" have been deprecated
   in favor of "min_val" and "max_val".
   Shape:
      * Input: (), where * means any number of dimensions.
      * Output: (), same shape as the input.
   [image]
   Examples:
      >>> m = nn.Hardtanh(-2, 2)


Examples:
      >>> m = nn.Hardtanh(-2, 2)
      >>> input = torch.randn(2)
      >>> output = m(input)


ConvBn2dclass torch.ao.nn.intrinsic.qat.ConvBn2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=None, padding_mode='zeros', eps=1e-05, momentum=0.1, freeze_bn=False, qconfig=None)
   A ConvBn2d module is a module fused from Conv2d and BatchNorm2d,
   attached with FakeQuantize modules for weight, used in quantization
   aware training.
   We combined the interface of "torch.nn.Conv2d" and
   "torch.nn.BatchNorm2d".
   Similar to "torch.nn.Conv2d", with FakeQuantize modules initialized
   to default.
   Variables:
      * freeze_bn --
      * weight_fake_quant -- fake quant module for weight


torch.wheretorch.where(condition, input, other, , out=None) -> Tensor
   Return a tensor of elements selected from either "input" or
   "other", depending on "condition".
   The operation is defined as:
      \text{out}_i = \begin{cases}     \text{input}_i & \text{if }
      \text{condition}_i \     \text{other}_i & \text{otherwise} \
      \end{cases}
   Note:
     The tensors "condition", "input", "other" must be broadcastable.
   Parameters:
      * condition (BoolTensor) -- When True (nonzero), yield
        input, otherwise yield other
      * input (Tensor or Scalar) -- value (if "input" is a
        scalar) or values selected at indices where "condition" is
        "True"
      * other (Tensor or Scalar) -- value (if "other" is a
        scalar) or values selected at indices where "condition" is
        "False"
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Returns:


Returns:
      A tensor of shape equal to the broadcasted shape of "condition",
      "input", "other"
   Return type:
      Tensor
   Example:
      >>> x = torch.randn(3, 2)
      >>> y = torch.ones(3, 2)
      >>> x
      tensor([[-0.4620,  0.3139],
              [ 0.3898, -0.7197],
              [ 0.0478, -0.1657]])
      >>> torch.where(x > 0, x, y)
      tensor([[ 1.0000,  0.3139],
              [ 0.3898,  1.0000],
              [ 0.0478,  1.0000]])
      >>> x = torch.randn(2, 2, dtype=torch.double)
      >>> x
      tensor([[ 1.0779,  0.0383],
              [-0.8785, -1.1089]], dtype=torch.float64)
      >>> torch.where(x > 0, x, 0.)
      tensor([[1.0779, 0.0383],
              [0.0000, 0.0000]], dtype=torch.float64)
   torch.where(condition) -> tuple of LongTensor
   "torch.where(condition)" is identical to "torch.nonzero(condition,
   as_tuple=True)".
   Note:
     See also "torch.nonzero()".


torch.Tensor.clamp_Tensor.clamp_(min=None, max=None) -> Tensor
   In-place version of "clamp()"


torch.Tensor.leTensor.le(other) -> Tensor
   See "torch.le()".


GRUCellclass torch.ao.nn.quantized.dynamic.GRUCell(input_size, hidden_size, bias=True, dtype=torch.qint8)
   A gated recurrent unit (GRU) cell
   A dynamic quantized GRUCell module with floating point tensor as
   inputs and outputs. Weights are quantized to 8 bits. We adopt the
   same interface as torch.nn.GRUCell, please see
   https://pytorch.org/docs/stable/nn.html#torch.nn.GRUCell for
   documentation.
   Examples:
      >>> rnn = nn.GRUCell(10, 20)
      >>> input = torch.randn(6, 3, 10)
      >>> hx = torch.randn(3, 20)
      >>> output = []
      >>> for i in range(6):
      ...     hx = rnn(input[i], hx)
      ...     output.append(hx)


torch.Tensor.narrowTensor.narrow(dimension, start, length) -> Tensor
   See "torch.narrow()".


PerChannelMinMaxObserverclass torch.quantization.observer.PerChannelMinMaxObserver(ch_axis=0, dtype=torch.quint8, qscheme=torch.per_channel_affine, reduce_range=False, quant_min=None, quant_max=None, factory_kwargs=None, eps=1.1920928955078125e-07)
   Observer module for computing the quantization parameters based on
   the running per channel min and max values.
   This observer uses the tensor min/max statistics to compute the per
   channel quantization parameters. The module records the running
   minimum and maximum of incoming tensors, and uses this statistic to
   compute the quantization parameters.
   Parameters:
      * ch_axis -- Channel axis
      * dtype -- dtype argument to the quantize node needed to
        implement the reference model spec.
      * qscheme -- Quantization scheme to be used
      * reduce_range -- Reduces the range of the quantized data
        type by 1 bit
      * quant_min -- Minimum quantization value. If unspecified,


it will follow the 8-bit setup.
      * quant_max -- Maximum quantization value. If unspecified,
        it will follow the 8-bit setup.
      * eps (Tensor) -- Epsilon value for float32, Defaults to
        torch.finfo(torch.float32).eps.
   The quantization parameters are computed the same way as in
   "MinMaxObserver", with the difference that the running min/max
   values are stored per channel. Scales and zero points are thus
   computed per channel as well.
   Note:
     If the running minimum equals to the running maximum, the scales
     and zero_points are set to 1.0 and 0.
   reset_min_max_vals()
      Resets the min/max values.


torch.blackman_windowtorch.blackman_window(window_length, periodic=True, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
   Blackman window function.
      w[n] = 0.42 - 0.5 \cos \left( \frac{2 \pi n}{N - 1} \right) +
      0.08 \cos \left( \frac{4 \pi n}{N - 1} \right)
   where N is the full window size.
   The input "window_length" is a positive integer controlling the
   returned window size. "periodic" flag determines whether the
   returned window trims off the last duplicate value from the
   symmetric window and is ready to be used as a periodic window with
   functions like "torch.stft()". Therefore, if "periodic" is true,
   the N in above formula is in fact \text{window_length} + 1. Also,
   we always have "torch.blackman_window(L, periodic=True)" equal to
   "torch.blackman_window(L + 1, periodic=False)[:-1])".
   Note:
     If "window_length" =1, the returned window contains a single
     value 1.
   Parameters:


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


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


torch.Tensor.svdTensor.svd(some=True, compute_uv=True)
   See "torch.svd()"


torch.cuda.streamtorch.cuda.stream(stream)
   Wrapper around the Context-manager StreamContext that selects a
   given stream.
   Parameters:
      stream (Stream) -- selected stream. This manager is a no-
      op if it's "None".
   Return type:
      StreamContext
   ..Note:: In eager mode stream is of type Stream class while in JIT
   it is an object of the custom class "torch.classes.cuda.Stream".


torch.Tensor.log_Tensor.log_() -> Tensor
   In-place version of "log()"


device_ofclass torch.cuda.device_of(obj)
   Context-manager that changes the current device to that of given
   object.
   You can use both tensors and storages as arguments. If a given
   object is not allocated on a GPU, this is a no-op.
   Parameters:
      obj (Tensor or Storage) -- object allocated on the
      selected device.


torch.histogramtorch.histogram(input, bins, , range=None, weight=None, density=False, out=None)
   Computes a histogram of the values in a tensor.
   "bins" can be an integer or a 1D tensor.
   If "bins" is an int, it specifies the number of equal-width bins.
   By default, the lower and upper range of the bins is determined by
   the minimum and maximum elements of the input tensor. The "range"
   argument can be provided to specify a range for the bins.
   If "bins" is a 1D tensor, it specifies the sequence of bin edges
   including the rightmost edge. It should contain at least 2 elements
   and its elements should be increasing.
   Parameters:
      * input (Tensor) -- the input tensor.
      * bins -- int or 1D Tensor. If int, defines the number of
        equal-width bins. If tensor, defines the sequence of bin edges
        including the rightmost edge.
   Keyword Arguments:
      * range (tuple of python:float*) -- Defines the range of
        the bins.


the bins.
      * weight (Tensor) -- If provided, weight should have the
        same shape as input. Each value in input contributes its
        associated weight towards its bin's result.
      * density (bool) -- If False, the result will contain the
        count (or total weight) in each bin. If True, the result is
        the value of the probability density function over the bins,
        normalized such that the integral over the range of the bins
        is 1.
      * out (Tensor, optional) -- the output tensor. (tuple,
        optional): The result tuple of two output tensors (hist,
        bin_edges).
   Returns:
      1D Tensor containing the values of the histogram.
      bin_edges(Tensor): 1D Tensor containing the edges of the
      histogram bins.
   Return type:
      hist (Tensor)
   Example:
      >>> torch.histogram(torch.tensor([1., 2, 1]), bins=4, range=(0., 3.), weight=torch.tensor([1., 2., 4.]))


(tensor([ 0.,  5.,  2.,  0.]), tensor([0., 0.75, 1.5, 2.25, 3.]))
      >>> torch.histogram(torch.tensor([1., 2, 1]), bins=4, range=(0., 3.), weight=torch.tensor([1., 2., 4.]), density=True)
      (tensor([ 0.,  0.9524,  0.3810,  0.]), tensor([0., 0.75, 1.5, 2.25, 3.]))


torch.Tensor.arctanTensor.arctan() -> Tensor
   See "torch.arctan()"


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


torch.cuda.comm.broadcast_coalescedtorch.cuda.comm.broadcast_coalesced(tensors, devices, buffer_size=10485760)
   Broadcasts a sequence tensors to the specified GPUs. Small tensors
   are first coalesced into a buffer to reduce the number of
   synchronizations.
   Parameters:
      * tensors (sequence) -- tensors to broadcast. Must be on
        the same device, either CPU or GPU.
      * devices (Iterable[torch.device, str or
        int]) -- an iterable of GPU devices, among which to
        broadcast.
      * buffer_size (int) -- maximum size of the buffer used for
        coalescing
   Returns:
      A tuple containing copies of "tensor", placed on "devices".


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


torch.negtorch.neg(input, , out=None) -> Tensor
   Returns a new tensor with the negative of the elements of "input".
      \text{out} = -1 \times \text{input}
   Parameters:
      input (Tensor) -- the input tensor.
   Keyword Arguments:
      out (Tensor, optional*) -- the output tensor.
   Example:
      >>> a = torch.randn(5)
      >>> a
      tensor([ 0.0090, -0.2262, -0.0682, -0.2866,  0.3940])
      >>> torch.neg(a)
      tensor([-0.0090,  0.2262,  0.0682,  0.2866, -0.3940])


torch.Tensor.floor_Tensor.floor_() -> Tensor
   In-place version of "floor()"


torch.Tensor.heavisideTensor.heaviside(values) -> Tensor
   See "torch.heaviside()"


torch.nn.functional.max_unpool2dtorch.nn.functional.max_unpool2d(input, indices, kernel_size, stride=None, padding=0, output_size=None)
   Computes a partial inverse of "MaxPool2d".
   See "MaxUnpool2d" for details.
   Return type:
      Tensor


torch.Tensor.scatter_add_Tensor.scatter_add_(dim, index, src) -> Tensor
   Adds all values from the tensor "src" into "self" at the indices
   specified in the "index" tensor in a similar fashion as
   "scatter_()". For each value in "src", it is added 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".
   For a 3-D tensor, "self" is updated 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
   "self", "index" and "src" should have 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.
   Note:


broadcast.
   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".
   Parameters:
      * dim (int) -- the axis along which to index
      * index (LongTensor) -- the indices of elements to scatter
        and add, can be either empty or of the same dimensionality as
        "src". When empty, the operation returns "self" unchanged.
      * src (Tensor) -- the source elements to scatter and add
   Example:
      >>> src = torch.ones((2, 5))
      >>> index = torch.tensor([[0, 1, 2, 0, 0]])
      >>> torch.zeros(3, 5, dtype=src.dtype).scatter_add_(0, index, src)
      tensor([[1., 0., 0., 1., 1.],
              [0., 1., 0., 0., 0.],
              [0., 0., 1., 0., 0.]])
      >>> index = torch.tensor([[0, 1, 2, 0, 0], [0, 1, 2, 2, 2]])
      >>> torch.zeros(3, 5, dtype=src.dtype).scatter_add_(0, index, src)


tensor([[2., 0., 0., 1., 1.],
              [0., 2., 0., 0., 0.],
              [0., 0., 2., 1., 1.]])


torch.jit.optimize_for_inferencetorch.jit.optimize_for_inference(mod, other_methods=None)
   Performs a set of optimization passes to optimize a model for the
   purposes of inference. If the model is not already frozen,
   optimize_for_inference will invoke torch.jit.freeze
   automatically.
   In addition to generic optimizations that should speed up your
   model regardless of environment, prepare for inference will also
   bake in build specific settings such as the presence of CUDNN or
   MKLDNN, and may in the future make transformations which speed
   things up on one machine but slow things down on another.
   Accordingly, serialization is not implemented following invoking
   optimize_for_inference and is not guaranteed.
   This is still in prototype, and may have the potential to slow down
   your model. Primary use cases that have been targeted so far have
   been vision models on cpu and gpu to a lesser extent.


Example (optimizing a module with Conv->Batchnorm):
      import torch
      in_channels, out_channels = 3, 32
      conv = torch.nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=2, bias=True)
      bn = torch.nn.BatchNorm2d(out_channels, eps=.001)
      mod = torch.nn.Sequential(conv, bn)
      frozen_mod = torch.jit.optimize_for_inference(torch.jit.script(mod.eval()))
      assert "batch_norm" not in str(frozen_mod.graph)
      # if built with MKLDNN, convolution will be run with MKLDNN weights
      assert "MKLDNN" in frozen_mod.graph
   Return type:
      ScriptModule


torch.Tensor.addcmulTensor.addcmul(tensor1, tensor2, *, value=1) -> Tensor
   See "torch.addcmul()"


torch.cuda.is_current_stream_capturingtorch.cuda.is_current_stream_capturing()
   Returns True if CUDA graph capture is underway on the current CUDA
   stream, False otherwise.
   If a CUDA context does not exist on the current device, returns
   False without initializing the context.


torch.Tensor.aminTensor.amin(dim=None, keepdim=False) -> Tensor
   See "torch.amin()"


torch.is_warn_always_enabledtorch.is_warn_always_enabled()
   Returns True if the global warn_always flag is turned on. Refer to
   "torch.set_warn_always()" documentation for more details.


torch.Tensor.repeat_interleaveTensor.repeat_interleave(repeats, dim=None, *, output_size=None) -> Tensor
   See "torch.repeat_interleave()".


upsampleclass torch.ao.nn.quantized.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.quantized.functional.interpolate()". This is equivalent
     with "nn.quantized.functional.interpolate(...)".
   See "torch.nn.functional.interpolate()" for implementation details.
   The input dimensions are interpreted in the form: mini-batch x
   channels x [optional depth] x [optional height] x width.
   Note:
     The input quantization parameters propagate to the output.
   Note:
     Only 2D input is supported for quantized inputs
   Note:
     Only the following modes are supported for the quantized inputs:
     * bilinear
     * nearest
   Parameters:
      * input (Tensor) -- quantized 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 be an integer.
      * mode (str) -- algorithm used for upsampling: "'nearest'"
        | "'bilinear'"
      * 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 "'bilinear'".
        Default: "False"


Default: "False"
   Warning:
     With "align_corners = True", the linearly interpolating modes
     (bilinear) 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.Tensor.nansumTensor.nansum(dim=None, keepdim=False, dtype=None) -> Tensor
   See "torch.nansum()"


torch.Tensor.unbindTensor.unbind(dim=0) -> seq
   See "torch.unbind()"


torch.isclosetorch.isclose(input, other, rtol=1e-05, atol=1e-08, equal_nan=False) -> Tensor
   Returns a new tensor with boolean elements representing if each
   element of "input" is "close" to the corresponding element of
   "other". Closeness is defined as:
      \lvert \text{input} - \text{other} \rvert \leq \texttt{atol} +
      \texttt{rtol} \times \lvert \text{other} \rvert
   where "input" and "other" are finite. Where "input" and/or "other"
   are nonfinite they are close if and only if they are equal, with
   NaNs being considered equal to each other when "equal_nan" is True.
   Parameters:
      * input (Tensor) -- first tensor to compare
      * other (Tensor) -- second tensor to compare
      * atol (float, optional) -- absolute tolerance.
        Default: 1e-08
      * rtol (float, optional) -- relative tolerance.
        Default: 1e-05
      * equal_nan (bool, optional) -- if "True", then two


"NaN" s will be considered equal. Default: "False"
   Examples:
      >>> torch.isclose(torch.tensor((1., 2, 3)), torch.tensor((1 + 1e-10, 3, 4)))
      tensor([ True, False, False])
      >>> torch.isclose(torch.tensor((float('inf'), 4)), torch.tensor((float('inf'), 6)), rtol=.5)
      tensor([True, True])


torch.nn.functional.kl_divtorch.nn.functional.kl_div(input, target, size_average=None, reduce=None, reduction='mean', log_target=False)
   The Kullback-Leibler divergence Loss
   See "KLDivLoss" for details.
   Parameters:
      * input (Tensor) -- Tensor of arbitrary shape in log-
        probabilities.
      * target (Tensor) -- Tensor of the same shape as input.
        See "log_target" for the target's interpretation.
      * 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"
      * 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'" | "'batchmean'" | "'sum'" |
        "'mean'". "'none'": no reduction will be applied
        "'batchmean'": the sum of the output will be divided by the
        batchsize "'sum'": the output will be summed "'mean'": the
        output will be divided by the number of elements in the output
        Default: "'mean'"
      * log_target (bool) -- A flag indicating whether "target"
        is passed in the log space. It is recommended to pass certain
        distributions (like "softmax") in the log space to avoid
        numerical issues caused by explicit "log". Default: "False"
   Return type:
      Tensor
   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".
   Note:
     "reduction" = "'mean'" doesn't return the true kl divergence
     value, please use "reduction" = "'batchmean'" which aligns with
     KL math definition. In the next major release, "'mean'" will be
     changed to be the same as 'batchmean'.


torch.raveltorch.ravel(input) -> Tensor
   Return a contiguous flattened tensor. A copy is made only if
   needed.
   Parameters:
      input (Tensor) -- the input tensor.
   Example:
      >>> t = torch.tensor([[[1, 2],
      ...                    [3, 4]],
      ...                   [[5, 6],
      ...                    [7, 8]]])
      >>> torch.ravel(t)
      tensor([1, 2, 3, 4, 5, 6, 7, 8])


torch.get_default_dtypetorch.get_default_dtype() -> torch.dtype
   Get the current default floating point "torch.dtype".
   Example:
      >>> torch.get_default_dtype()  # initial default for floating point is torch.float32
      torch.float32
      >>> torch.set_default_dtype(torch.float64)
      >>> torch.get_default_dtype()  # default is now changed to torch.float64
      torch.float64
      >>> torch.set_default_tensor_type(torch.FloatTensor)  # setting tensor type also affects this
      >>> torch.get_default_dtype()  # changed to torch.float32, the dtype for torch.FloatTensor
      torch.float32


torch.autograd.backwardtorch.autograd.backward(tensors, grad_tensors=None, retain_graph=None, create_graph=False, grad_variables=None, inputs=None)
   Computes the sum of gradients of given tensors with respect to
   graph leaves.
   The graph is differentiated using the chain rule. If any of
   "tensors" are non-scalar (i.e. their data has more than one
   element) and require gradient, then the Jacobian-vector product
   would be computed, in this case the function additionally requires
   specifying "grad_tensors". It should be a sequence of matching
   length, that contains the "vector" in the Jacobian-vector product,
   usually the gradient of the differentiated function w.r.t.
   corresponding tensors ("None" is an acceptable value for all
   tensors that don't need gradient tensors).
   This function accumulates gradients in the leaves - you might need
   to zero ".grad" attributes or set them to "None" before calling it.


See Default gradient layouts for details on the memory layout of
   accumulated gradients.
   Note:
     Using this method with "create_graph=True" will create a
     reference cycle between the parameter and its gradient which can
     cause a memory leak. We recommend using "autograd.grad" when
     creating the graph to avoid this. If you have to use this
     function, make sure to reset the ".grad" fields of your
     parameters to "None" after use to break the cycle and avoid the
     leak.
   Note:
     If you run any forward ops, create "grad_tensors", and/or call
     "backward" in a user-specified CUDA stream context, see Stream
     semantics of backward passes.
   Note:
     When "inputs" are provided and a given input is not a leaf, the
     current implementation will call its grad_fn (even though it is
     not strictly needed to get this gradients). It is an
     implementation detail on which the user should not rely. See htt


ps://github.com/pytorch/pytorch/pull/60521#issuecomment-867061780
     for more details.
   Parameters:
      * tensors (Sequence[Tensor] or Tensor) -- Tensors
        of which the derivative will be computed.
      * grad_tensors (Sequence[Tensor or None] or
        Tensor, optional) -- The "vector" in the Jacobian-
        vector product, usually gradients w.r.t. each element of
        corresponding tensors. None values can be specified for scalar
        Tensors or ones that don't require grad. If a None value would
        be acceptable for all grad_tensors, then this argument is
        optional.
      * retain_graph (bool, optional) -- If "False", the
        graph used to compute the grad will be freed. Note that in
        nearly all cases setting this option to "True" is not needed
        and often can be worked around in a much more efficient way.
        Defaults to the value of "create_graph".


Defaults to the value of "create_graph".
      * create_graph (bool, optional) -- If "True", graph of
        the derivative will be constructed, allowing to compute higher
        order derivative products. Defaults to "False".
      * inputs (Sequence[Tensor] or Tensor,
        optional) -- Inputs w.r.t. which the gradient be will
        accumulated into ".grad". All other Tensors will be ignored.
        If not provided, the gradient is accumulated into all the leaf
        Tensors that were used to compute the attr::tensors.


torch.geqrftorch.geqrf(input, , out=None)
   This is a low-level function for calling LAPACK's geqrf directly.
   This function returns a namedtuple (a, tau) as defined in LAPACK
   documentation for geqrf .
   Computes a QR decomposition of "input". Both Q and R matrices
   are stored in the same output tensor a. The elements of R are
   stored on and above the diagonal. Elementary reflectors (or
   Householder vectors) implicitly defining matrix Q are stored
   below the diagonal. The results of this function can be used
   together with "torch.linalg.householder_product()" to obtain the
   Q matrix or with "torch.ormqr()", which uses an implicit
   representation of the Q* matrix, for an efficient matrix-matrix
   multiplication.
   See LAPACK documentation for geqrf for further details.
   Note:
     See also "torch.linalg.qr()", which computes Q and R matrices,
     and "torch.linalg.lstsq()" with the "driver="gels"" option for a


function that can solve matrix equations using a QR
     decomposition.
   Parameters:
      input (Tensor) -- the input matrix
   Keyword Arguments:
      out (tuple, optional) -- the output tuple of (Tensor,
      Tensor). Ignored if None. Default: None.


torch.autograd.Function.backwardstatic Function.backward(ctx, *grad_outputs)
   Defines a formula for differentiating the operation with backward
   mode automatic differentiation (alias to the vjp function).
   This function is to be overridden by all subclasses.
   It must accept a context "ctx" as the first argument, followed by
   as many outputs as the "forward()" returned (None will be passed in
   for non tensor outputs of the forward function), and it should
   return as many tensors, as there were inputs to "forward()". Each
   argument is the gradient w.r.t the given output, and each returned
   value should be the gradient w.r.t. the corresponding input. If an
   input is not a Tensor or is a Tensor not requiring grads, you can
   just pass None as a gradient for that input.
   The context can be used to retrieve tensors saved during the
   forward pass. It also has an attribute "ctx.needs_input_grad" as a