shrinath-suresh/blogs-docs-splitted huggingface dataset:
size. The computed output size will be used to infer new
        scales for the interpolation. Note that when scale_factor is
        floating-point, it may differ from the recomputed
        scale_factor due to rounding and precision issues. If
        recompute_scale_factor is "False", then size or
        scale_factor will be used directly for interpolation.
Shape:
      * Input: (N, C, W_{in}), (N, C, H_{in}, W_{in}) or (N, C,
        D_{in}, H_{in}, W_{in})
  * Output: (N, C, W_{out}), (N, C, H_{out}, W_{out}) or (N, C,
    D_{out}, H_{out}, W_{out}), where

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

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

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

Warning:
 With "align_corners = True", the linearly interpolating modes
 (*linear*, *bilinear*, *bicubic*, and *trilinear*) don't
proportionally align the output and input pixels, and thus the
     output values can depend on the input size. This was the default
     behavior for these modes up to version 0.3.1. Since then, the
     default behavior is "align_corners = False". See below for
     concrete examples on how this affects the outputs.
Note:
 If you want downsampling/general resizing, you should use
 "interpolate()".

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

  >>> m = nn.Upsample(scale_factor=2, mode='nearest')
  >>> m(input)
  tensor([[[[1., 1., 2., 2.],
            [1., 1., 2., 2.],
            [3., 3., 4., 4.],
            [3., 3., 4., 4.]]]])

  >>> m = nn.Upsample(scale_factor=2, mode='bilinear')  # align_corners=False
  >>> m(input)
  tensor([[[[1.0000, 1.2500, 1.7500, 2.0000],
            [1.5000, 1.7500, 2.2500, 2.5000],
[1.5000, 1.7500, 2.2500, 2.5000],
                [2.5000, 2.7500, 3.2500, 3.5000],
                [3.0000, 3.2500, 3.7500, 4.0000]]]])
  >>> m = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
  >>> m(input)
  tensor([[[[1.0000, 1.3333, 1.6667, 2.0000],
            [1.6667, 2.0000, 2.3333, 2.6667],
            [2.3333, 2.6667, 3.0000, 3.3333],
            [3.0000, 3.3333, 3.6667, 4.0000]]]])

  >>> # Try scaling the same data in a larger tensor
  >>> input_3x3 = torch.zeros(3, 3).view(1, 1, 3, 3)
  >>> input_3x3[:, :, :2, :2].copy_(input)
  tensor([[[[1., 2.],
            [3., 4.]]]])
  >>> input_3x3
  tensor([[[[1., 2., 0.],
            [3., 4., 0.],
            [0., 0., 0.]]]])

  >>> m = nn.Upsample(scale_factor=2, mode='bilinear')  # align_corners=False
  >>> # Notice that values in top left corner are the same with the small input (except at boundary)
  >>> m(input_3x3)
m(input_3x3)
      tensor([[[[1.0000, 1.2500, 1.7500, 1.5000, 0.5000, 0.0000],
                [1.5000, 1.7500, 2.2500, 1.8750, 0.6250, 0.0000],
                [2.5000, 2.7500, 3.2500, 2.6250, 0.8750, 0.0000],
                [2.2500, 2.4375, 2.8125, 2.2500, 0.7500, 0.0000],
                [0.7500, 0.8125, 0.9375, 0.7500, 0.2500, 0.0000],
                [0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000]]]])



  >>> m = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
  >>> # Notice that values in top left corner are now changed
  >>> m(input_3x3)
  tensor([[[[1.0000, 1.4000, 1.8000, 1.6000, 0.8000, 0.0000],
            [1.8000, 2.2000, 2.6000, 2.2400, 1.1200, 0.0000],
            [2.6000, 3.0000, 3.4000, 2.8800, 1.4400, 0.0000],
            [2.4000, 2.7200, 3.0400, 2.5600, 1.2800, 0.0000],
            [1.2000, 1.3600, 1.5200, 1.2800, 0.6400, 0.0000],
            [0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000]]]])
Conv3d
class torch.ao.nn.quantized.Conv3d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
Applies a 3D convolution over a quantized input signal composed of
   several quantized input planes.
For details on input arguments, parameters, and implementation see
   "Conv3d".
Note:
 Only *zeros* is supported for the "padding_mode" argument.

Note:
 Only *torch.quint8* is supported for the input data type.

Variables:
      * weight (Tensor) -- packed tensor derived from the
        learnable weight parameter.
  * **scale** (*Tensor*) -- scalar for the output scale

  * **zero_point** (*Tensor*) -- scalar for the output zero point

See "Conv3d" for other attributes.
Examples:
  >>> # With square kernels and equal stride
  >>> m = nn.quantized.Conv3d(16, 33, 3, stride=2)
  >>> # non-square kernels and unequal stride and with padding
m = nn.quantized.Conv3d(16, 33, (3, 5, 5), stride=(1, 2, 2), padding=(1, 2, 2))
      >>> # non-square kernels and unequal stride and with padding and dilation
      >>> m = nn.quantized.Conv3d(16, 33, (3, 5, 5), stride=(1, 2, 2), padding=(1, 2, 2), dilation=(1, 2, 2))
      >>> input = torch.randn(20, 16, 56, 56, 56)
      >>> # quantize input to quint8
      >>> q_input = torch.quantize_per_tensor(input, scale=1.0, zero_point=0, dtype=torch.quint8)
      >>> output = m(q_input)



classmethod from_float(mod)
  Creates a quantized module from a float module or qparams_dict.

  Parameters:
     **mod** (*Module*) -- a float module, either produced by
     torch.ao.quantization utilities or provided by the user
torch.nn.utils.rnn.pad_sequence
torch.nn.utils.rnn.pad_sequence(sequences, batch_first=False, padding_value=0.0)
Pad a list of variable length Tensors with "padding_value"
"pad_sequence" stacks a list of Tensors along a new dimension, and
   pads them to equal length. For example, if the input is list of
   sequences with size "L x " and if batch_first is False, and "T x B
   x " otherwise.
B is batch size. It is equal to the number of elements in
   "sequences". T is length of the longest sequence. L is length
   of the sequence. *** is any number of trailing dimensions,
   including none.
-[ Example ]-



from torch.nn.utils.rnn import pad_sequence
a = torch.ones(25, 300)
b = torch.ones(22, 300)
c = torch.ones(15, 300)
pad_sequence([a, b, c]).size()
   torch.Size([25, 3, 300])



Note:
 This function returns a Tensor of size "T x B x *" or "B x T x *"
where T is the length of the longest sequence. This function
     assumes trailing dimensions and type of all the Tensors in
     sequences are same.
Parameters:
      * sequences (list[Tensor]) -- list of variable
        length sequences.
  * **batch_first** (*bool**, **optional*) -- output will be in "B
    x T x *" if True, or in "T x B x *" otherwise. Default: False.

  * **padding_value** (*float**, **optional*) -- value for padded
    elements. Default: 0.

Returns:
      Tensor of size "T x B x " if "batch_first" is "False". Tensor
      of size "B x T x " otherwise
Return type:
      Tensor
torch.trapezoid
torch.trapezoid(y, x=None, *, dx=None, dim=- 1) -> Tensor
Computes the trapezoidal rule along "dim". By default the spacing
   between elements is assumed to be 1, but "dx" can be used to
   specify a different constant spacing, and "x" can be used to
   specify arbitrary spacing along "dim".
Assuming "y" is a one-dimensional tensor with elements {y_0, y_1,
   ..., y_n}, the default computation is
  \begin{aligned}     \sum_{i = 1}^{n-1} \frac{1}{2} (y_i +
  y_{i-1}) \end{aligned}

When "dx" is specified the computation becomes
  \begin{aligned}     \sum_{i = 1}^{n-1} \frac{\Delta x}{2} (y_i +
  y_{i-1}) \end{aligned}

effectively multiplying the result by "dx". When "x" is specified,
   assuming "x" is also a one-dimensional tensor with elements {x_0,
   x_1, ..., x_n}, the computation becomes
  \begin{aligned}     \sum_{i = 1}^{n-1} \frac{(x_i - x_{i-1})}{2}
  (y_i + y_{i-1}) \end{aligned}
(y_i + y_{i-1}) \end{aligned}
When "x" and "y" have the same size, the computation is as
   described above and no broadcasting is needed. The broadcasting
   behavior of this function is as follows when their sizes are
   different. For both "x" and "y", the function computes the
   difference between consecutive elements along dimension "dim". This
   effectively creates two tensors, x_diff and y_diff, that have
   the same shape as the original tensors except their lengths along
   the dimension "dim" is reduced by 1. After that, those two tensors
   are broadcast together to compute final output as part of the
   trapezoidal rule. See the examples below for details.
Note:
 The trapezoidal rule is a technique for approximating the
 definite integral of a function by averaging its left and right
 Riemann sums. The approximation becomes more accurate as the
 resolution of the partition increases.

Parameters:
      * y (Tensor) -- Values to use when computing the
trapezoidal rule.
  * **x** (*Tensor*) -- If specified, defines spacing between
    values as specified above.

Keyword Arguments:
      * dx (float) -- constant spacing between values. If
        neither "x" or "dx" are specified then this defaults to 1.
        Effectively multiplies the result by its value.
  * **dim** (*int*) -- The dimension along which to compute the
    trapezoidal rule. The last (inner-most) dimension by default.

Examples:
  >>> # Computes the trapezoidal rule in 1D, spacing is implicitly 1
  >>> y = torch.tensor([1, 5, 10])
  >>> torch.trapezoid(y)
  tensor(10.5)

  >>> # Computes the same trapezoidal rule directly to verify
  >>> (1 + 10 + 10) / 2
  10.5

  >>> # Computes the trapezoidal rule in 1D with constant spacing of 2
  >>> # NOTE: the result is the same as before, but multiplied by 2
  >>> torch.trapezoid(y, dx=2)
  21.0

  >>> # Computes the trapezoidal rule in 1D with arbitrary spacing
x = torch.tensor([1, 3, 6])
      >>> torch.trapezoid(y, x)
      28.5



  >>> # Computes the same trapezoidal rule directly to verify
  >>> ((3 - 1) * (1 + 5) + (6 - 3) * (5 + 10)) / 2
  28.5

  >>> # Computes the trapezoidal rule for each row of a 3x3 matrix
  >>> y = torch.arange(9).reshape(3, 3)
  tensor([[0, 1, 2],
          [3, 4, 5],
          [6, 7, 8]])
  >>> torch.trapezoid(y)
  tensor([ 2., 8., 14.])

  >>> # Computes the trapezoidal rule for each column of the matrix
  >>> torch.trapezoid(y, dim=0)
  tensor([ 6., 8., 10.])

  >>> # Computes the trapezoidal rule for each row of a 3x3 ones matrix
  >>> #   with the same arbitrary spacing
  >>> y = torch.ones(3, 3)
  >>> x = torch.tensor([1, 3, 6])
  >>> torch.trapezoid(y, x)
  array([5., 5., 5.])

  >>> # Computes the trapezoidal rule for each row of a 3x3 ones matrix
  >>> #   with different arbitrary spacing per row
  >>> y = torch.ones(3, 3)
RAdam
class torch.optim.RAdam(params, lr=0.001, betas=(0.9, 0.999), eps=1e-08, weight_decay=0, *, foreach=None, differentiable=False)
Implements RAdam algorithm.
  \begin{aligned}       &\rule{110mm}{0.4pt}
  \\       &\textbf{input}      : \gamma \text{ (lr)}, \: \beta_1,
  \beta_2           \text{ (betas)}, \: \theta_0 \text{ (params)},
  \:f(\theta) \text{ (objective)}, \:           \lambda \text{
  (weightdecay)},
  \\       &\hspace{13mm} \epsilon \text{ (epsilon)}
  \\       &\textbf{initialize} :  m_0 \leftarrow 0 \text{ ( first
  moment)},           v_0 \leftarrow 0 \text{ ( second moment)},
  \\       &\hspace{18mm} \rho_{\infty} \leftarrow 2/(1-\beta_2)
  -1                      \\[-1.ex]       &\rule{110mm}{0.4pt}  \\
  &\textbf{for} \: t=1 \: \textbf{to} \: \ldots \: \textbf{do}
  \\       &\hspace{6mm}g_t           \leftarrow   \nabla_{\theta}
  f_t (\theta_{t-1})           \\       &\hspace{5mm} \textbf{if}
\: \lambda \neq 0                                          \
      &\hspace{10mm} g_t \leftarrow g_t + \lambda \theta_{t-1}
      \       &\hspace{6mm}m_t           \leftarrow   \beta_1 m_{t-1}
      + (1 - \beta_1) g_t          \       &\hspace{6mm}v_t
      \leftarrow   \beta_2 v_{t-1} + (1-\beta_2) g^2_t          \
      &\hspace{6mm}\widehat{m_t} \leftarrow   m_t/\big(1-\beta_1^t
      \big)                   \       &\hspace{6mm}\rho_t \leftarrow
      \rho_{\infty} -           2 t \beta^t_2 /\big(1-\beta_2^t \big)
      \[0.1.ex]       &\hspace{6mm}\textbf{if} \: \rho_t > 5
      \       &\hspace{12mm} l_t \leftarrow \frac{\sqrt{
      (1-\beta^t_2) }}{ \sqrt{v_t} +\epsilon  } \
      &\hspace{12mm} r_t \leftarrow \sqrt{\frac{(\rho_t-4)(\rho_t-2)\
      rho_{\infty}}{(\rho_{\infty}-4)(\rho_{\infty}-2) \rho_t}} \
      &\hspace{12mm}\theta_t \leftarrow \theta_{t-1} - \gamma
      \widehat{m_t} r_t l_t        \       &\hspace{6mm}\textbf{else}
\       &\hspace{12mm}\theta_t \leftarrow \theta_{t-1} - \gamma
      \widehat{m_t}                \       &\rule{110mm}{0.4pt}
      \[-1.ex]       &\bf{return} \:  \theta_t
      \[-1.ex]       &\rule{110mm}{0.4pt}
      \[-1.ex]  \end{aligned}
For further details regarding the algorithm we refer to On the
   variance of the adaptive learning rate and beyond.
This implementation uses the same weight_decay implementation as
   Adam (were the weight_decay is applied to the gradient) and not the
   one from AdamW (were weight_decay is applied to the update). This
   is different from the author's implementation.
Parameters:
      * params (iterable) -- iterable of parameters to optimize
        or dicts defining parameter groups
  * **lr** (*float**, **optional*) -- learning rate (default:
    1e-3)

  * **betas** (*Tuple**[**float**, **float**]**, **optional*) --
    coefficients used for computing running averages of gradient
and its square (default: (0.9, 0.999))
  * **eps** (*float**, **optional*) -- term added to the
    denominator to improve numerical stability (default: 1e-8)

  * **weight_decay** (*float**, **optional*) -- weight decay (L2
    penalty) (default: 0)

  * **foreach** (*bool**, **optional*) -- whether foreach
    implementation of optimizer is used. If unspecified by the
    user (so foreach is None), we will try to use foreach over the
    for-loop implementation on CUDA, since it is usually
    significantly more performant. (default: None)

  * **differentiable** (*bool**, **optional*) -- whether autograd
    should occur through the optimizer step in training.
    Otherwise, the step() function runs in a torch.no_grad()
    context. Setting to True can impair performance, so leave it
    False if you don't intend to run autograd through this
    instance (default: False)

add_param_group(param_group)
add_param_group(param_group)
  Add a param group to the "Optimizer" s *param_groups*.

  This can be useful when fine tuning a pre-trained network as
  frozen layers can be made trainable and added to the "Optimizer"
  as training progresses.

  Parameters:
     **param_group** (*dict*) -- Specifies what Tensors should be
     optimized along with group specific optimization options.

load_state_dict(state_dict)
  Loads the optimizer state.

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

register_step_post_hook(hook)
  Register an optimizer step post hook which will be called after
  optimizer step. It should have the following signature:

     hook(optimizer, args, kwargs) -> None

  The "optimizer" argument is the optimizer instance being used.

  Parameters:
     **hook** (*Callable*) -- The user defined hook to be
     registered.
registered.
  Returns:
     a handle that can be used to remove the added hook by calling
     "handle.remove()"

  Return type:
     "torch.utils.hooks.RemoveableHandle"

register_step_pre_hook(hook)
  Register an optimizer step pre hook which will be called before
  optimizer step. It should have the following signature:

     hook(optimizer, args, kwargs) -> None or modified args and kwargs

  The "optimizer" argument is the optimizer instance being used.
  If args and kwargs are modified by the pre-hook, then the
  transformed values are returned as a tuple containing the
  new_args and new_kwargs.

  Parameters:
     **hook** (*Callable*) -- The user defined hook to be
     registered.

  Returns:
     a handle that can be used to remove the added hook by calling
     "handle.remove()"

  Return type:
     "torch.utils.hooks.RemoveableHandle"

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

  It contains two entries:

  * state - a dict holding current optimization state. Its content
       differs between optimizer classes.

  * param_groups - a list containing all parameter groups where
    each
       parameter group is a dict

zero_grad(set_to_none=False)
  Sets the gradients of all optimized "torch.Tensor" s to zero.

  Parameters:
     **set_to_none** (*bool*) -- instead of setting to zero, set
     the grads to None. This will in general have lower memory
     footprint, and can modestly improve performance. However, it
     changes certain behaviors. For example: 1. When the user
     tries to access a gradient and perform manual ops on it, a
     None attribute or a Tensor full of 0s will behave
     differently. 2. If the user requests
     "zero_grad(set_to_none=True)" followed by a backward pass,
PixelUnshuffle
class torch.nn.PixelUnshuffle(downscale_factor)
Reverses the "PixelShuffle" operation by rearranging elements in a
   tensor of shape (, C, H \times r, W \times r) to a tensor of shape
   (, C \times r^2, H, W), where r is a downscale factor.
See the paper: Real-Time Single Image and Video Super-Resolution
   Using an Efficient Sub-Pixel Convolutional Neural Network by Shi
   et. al (2016) for more details.
Parameters:
      downscale_factor (int) -- factor to decrease spatial
      resolution by
Shape:
      * Input: (*, C_{in}, H_{in}, W_{in}), where * is zero or more
        batch dimensions
  * Output: (*, C_{out}, H_{out}, W_{out}), where

  C_{out} = C_{in} \times \text{downscale\_factor}^2

  H_{out} = H_{in} \div \text{downscale\_factor}

  W_{out} = W_{in} \div \text{downscale\_factor}

Examples:
  >>> pixel_unshuffle = nn.PixelUnshuffle(3)
  >>> input = torch.randn(1, 1, 12, 12)
torch.nn.functional.log_softmax
torch.nn.functional.log_softmax(input, dim=None, _stacklevel=3, dtype=None)
Applies a softmax followed by a logarithm.
While mathematically equivalent to log(softmax(x)), doing these two
   operations separately is slower and numerically unstable. This
   function uses an alternative formulation to compute the output and
   gradient correctly.
See "LogSoftmax" for more details.
Parameters:
      * input (Tensor) -- input
  * **dim** (*int*) -- A dimension along which log_softmax will be
    computed.

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

Return type:
      Tensor
AvgPool3d
class torch.nn.AvgPool3d(kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None)
Applies a 3D average pooling over an input signal composed of
   several input planes.
In the simplest case, the output value of the layer with input size
   (N, C, D, H, W), output (N, C, D_{out}, H_{out}, W_{out}) and
   "kernel_size" (kD, kH, kW) can be precisely described as:
  \begin{aligned}     \text{out}(N_i, C_j, d, h, w) ={} &
  \sum_{k=0}^{kD-1} \sum_{m=0}^{kH-1} \sum_{n=0}^{kW-1} \\
  & \frac{\text{input}(N_i, C_j, \text{stride}[0] \times d + k,
  \text{stride}[1] \times h + m, \text{stride}[2] \times w + n)}
  {kD \times kH \times kW} \end{aligned}

If "padding" is non-zero, then the input is implicitly zero-padded
   on all three sides for "padding" number of points.
Note:
 When ceil_mode=True, sliding windows are allowed to go off-bounds
 if they start within the left padding or the input. Sliding
windows that would start in the right padded region are ignored.
The parameters "kernel_size", "stride" can either be:
  * a single "int" -- in which case the same value is used for the
    depth, height and width dimension

  * a "tuple" of three ints -- in which case, the first *int* is
    used for the depth dimension, the second *int* for the height
    dimension and the third *int* for the width dimension

Parameters:
      * kernel_size (Union[int, Tuple[int, int,
        int]]) -- the size of the window
  * **stride** (*Union**[**int**, **Tuple**[**int**, **int**,
    **int**]**]*) -- the stride of the window. Default value is
    "kernel_size"

  * **padding** (*Union**[**int**, **Tuple**[**int**, **int**,
    **int**]**]*) -- implicit zero padding to be added on all
    three sides

  * **ceil_mode** (*bool*) -- when True, will use *ceil* instead
    of *floor* to compute the output shape
of floor to compute the output shape
  * **count_include_pad** (*bool*) -- when True, will include the
    zero-padding in the averaging calculation

  * **divisor_override** (*Optional**[**int**]*) -- if specified,
    it will be used as divisor, otherwise "kernel_size" will be
    used

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

       D_{out} = \left\lfloor\frac{D_{in} + 2 \times
       \text{padding}[0] -
       \text{kernel\_size}[0]}{\text{stride}[0]} + 1\right\rfloor

       H_{out} = \left\lfloor\frac{H_{in} + 2 \times
       \text{padding}[1] -
       \text{kernel\_size}[1]}{\text{stride}[1]} + 1\right\rfloor

       W_{out} = \left\lfloor\frac{W_{in} + 2 \times
       \text{padding}[2] -
       \text{kernel\_size}[2]}{\text{stride}[2]} + 1\right\rfloor

Examples:
Examples:
  >>> # pool of square window of size=3, stride=2
  >>> m = nn.AvgPool3d(3, stride=2)
  >>> # pool of non-square window
  >>> m = nn.AvgPool3d((3, 2, 2), stride=(2, 1, 2))
  >>> input = torch.randn(20, 16, 50, 44, 31)
  >>> output = m(input)
torch.Tensor.sparse_resize_and_clear_
Tensor.sparse_resize_and_clear_(size, sparse_dim, dense_dim) -> Tensor
Removes all specified elements from a sparse tensor "self" and
   resizes "self" to the desired size and the number of sparse and
   dense dimensions.
Parameters:
      * size (torch.Size) -- the desired size.
  * **sparse_dim** (*int*) -- the number of sparse dimensions

  * **dense_dim** (*int*) -- the number of dense dimensions
torch.nn.utils.stateless.functional_call
torch.nn.utils.stateless.functional_call(module, parameters_and_buffers, args, kwargs=None, *, tie_weights=True)
Performs a functional call on the module by replacing the module
   parameters and buffers with the provided ones.
Warning:
 This API is deprecated as of PyTorch 2.0 and will be removed in a
 future version of PyTorch. Please use
 "torch.func.functional_call()" instead, which is a drop-in
 replacement for this API.

Note:
 If the module has active parametrizations, passing a value in the
 "parameters_and_buffers" argument with the name set to the
 regular parameter name will completely disable the
 parametrization. If you want to apply the parametrization
 function to the value passed please set the key as
 "{submodule_name}.parametrizations.{parameter_name}.original".

Note:
 If the module performs in-place operations on parameters/buffers,
these will be reflected in the parameters_and_buffers
     input.Example:
    >>> a = {'foo': torch.zeros(())}
    >>> mod = Foo()  # does self.foo = self.foo + 1
    >>> print(mod.foo)  # tensor(0.)
    >>> functional_call(mod, a, torch.ones(()))
    >>> print(mod.foo)  # tensor(0.)
    >>> print(a['foo'])  # tensor(1.)

Note:
 If the module has tied weights, whether or not functional_call
 respects the tying is determined by the tie_weights flag.Example:

    >>> a = {'foo': torch.zeros(())}
    >>> mod = Foo()  # has both self.foo and self.foo_tied which are tied. Returns x + self.foo + self.foo_tied
    >>> print(mod.foo)  # tensor(1.)
    >>> mod(torch.zeros(()))  # tensor(2.)
    >>> functional_call(mod, a, torch.zeros(()))  # tensor(0.) since it will change self.foo_tied too
    >>> functional_call(mod, a, torch.zeros(()), tie_weights=False)  # tensor(1.)--self.foo_tied is not updated