neulab/docprompting-conala huggingface dataset:
class torch.distributions.uniform.Uniform(low, high, validate_args=None) [source]
 
Bases: torch.distributions.distribution.Distribution Generates uniformly distributed random samples from the half-open interval [low, high). Example: >>> m = Uniform(torch.tensor([0.0]), torch.tensor([5.0]))
>>> m.sample()  # uniformly distributed in the range [0.0, 5.0)
tensor([ 2.3418])
  Parameters 
 
low (float or Tensor) – lower range (inclusive). 
high (float or Tensor) – upper range (exclusive).     
arg_constraints = {'high': Dependent(), 'low': Dependent()} 
  
cdf(value) [source]

  
entropy() [source]

  
expand(batch_shape, _instance=None) [source]

  
has_rsample = True 
  
icdf(value) [source]

  
log_prob(value) [source]

  
property mean 
  
rsample(sample_shape=torch.Size([])) [source]

  
property stddev 
  
property support 
  
property variance
class torch.distributions.von_mises.VonMises(loc, concentration, validate_args=None) [source]
 
Bases: torch.distributions.distribution.Distribution A circular von Mises distribution. This implementation uses polar coordinates. The loc and value args can be any real number (to facilitate unconstrained optimization), but are interpreted as angles modulo 2 pi.  Example::

>>> m = dist.VonMises(torch.tensor([1.0]), torch.tensor([1.0]))
>>> m.sample() # von Mises distributed with loc=1 and concentration=1
tensor([1.9777])
    Parameters 
 
loc (torch.Tensor) – an angle in radians. 
concentration (torch.Tensor) – concentration parameter     
arg_constraints = {'concentration': GreaterThan(lower_bound=0.0), 'loc': Real()} 
  
expand(batch_shape) [source]

  
has_rsample = False 
  
log_prob(value) [source]

  
property mean  
The provided mean is the circular one. 
  
sample(sample_shape=torch.Size([])) [source]
 
The sampling algorithm for the von Mises distribution is based on the following paper: Best, D. J., and Nicholas I. Fisher. “Efficient simulation of the von Mises distribution.” Applied Statistics (1979): 152-157. 
  
support = Real() 
  
variance [source]
 
The provided variance is the circular one.
arg_constraints = {'concentration': GreaterThan(lower_bound=0.0), 'loc': Real()}
sample(sample_shape=torch.Size([])) [source]
 
The sampling algorithm for the von Mises distribution is based on the following paper: Best, D. J., and Nicholas I. Fisher. “Efficient simulation of the von Mises distribution.” Applied Statistics (1979): 152-157.
class torch.distributions.weibull.Weibull(scale, concentration, validate_args=None) [source]
 
Bases: torch.distributions.transformed_distribution.TransformedDistribution Samples from a two-parameter Weibull distribution. Example >>> m = Weibull(torch.tensor([1.0]), torch.tensor([1.0]))
>>> m.sample()  # sample from a Weibull distribution with scale=1, concentration=1
tensor([ 0.4784])
  Parameters 
 
scale (float or Tensor) – Scale parameter of distribution (lambda). 
concentration (float or Tensor) – Concentration parameter of distribution (k/shape).     
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'concentration': GreaterThan(lower_bound=0.0), 'scale': GreaterThan(lower_bound=0.0)} 
  
entropy() [source]

  
expand(batch_shape, _instance=None) [source]

  
property mean 
  
support = GreaterThan(lower_bound=0.0) 
  
property variance
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'concentration': GreaterThan(lower_bound=0.0), 'scale': GreaterThan(lower_bound=0.0)}
torch.div(input, other, *, rounding_mode=None, out=None) → Tensor  
Divides each element of the input input by the corresponding element of other.  outi=inputiotheri\text{out}_i = \frac{\text{input}_i}{\text{other}_i}  
 Note By default, this performs a “true” division like Python 3. See the rounding_mode argument for floor division.  Supports broadcasting to a common shape, type promotion, and integer, float, and complex inputs. Always promotes integer types to the default scalar type.  Parameters 
 
input (Tensor) – the dividend 
other (Tensor or Number) – the divisor   Keyword Arguments 
 
rounding_mode (str, optional) – 
Type of rounding applied to the result:  None - default behavior. Performs no rounding and, if both input and other are integer types, promotes the inputs to the default scalar type. Equivalent to true division in Python (the / operator) and NumPy’s np.true_divide. 
"trunc" - rounds the results of the division towards zero. Equivalent to C-style integer division. 
"floor" - rounds the results of the division down. Equivalent to floor division in Python (the // operator) and NumPy’s np.floor_divide.   
out (Tensor, optional) – the output tensor.    Examples: >>> x = torch.tensor([ 0.3810,  1.2774, -0.2972, -0.3719,  0.4637])
>>> torch.div(x, 0.5)
tensor([ 0.7620,  2.5548, -0.5944, -0.7438,  0.9274])

>>> a = torch.tensor([[-0.3711, -1.9353, -0.4605, -0.2917],
...                   [ 0.1815, -1.0111,  0.9805, -1.5923],
...                   [ 0.1062,  1.4581,  0.7759, -1.2344],
...                   [-0.1830, -0.0313,  1.1908, -1.4757]])
>>> b = torch.tensor([ 0.8032,  0.2930, -0.8113, -0.2308])
>>> torch.div(a, b)
tensor([[-0.4620, -6.6051,  0.5676,  1.2639],
        [ 0.2260, -3.4509, -1.2086,  6.8990],
        [ 0.1322,  4.9764, -0.9564,  5.3484],
        [-0.2278, -0.1068, -1.4678,  6.3938]])

>>> torch.div(a, b, rounding_mode='trunc')
tensor([[-0., -6.,  0.,  1.],
        [ 0., -3., -1.,  6.],
        [ 0.,  4., -0.,  5.],
        [-0., -0., -1.,  6.]])

>>> torch.div(a, b, rounding_mode='floor')
tensor([[-1., -7.,  0.,  1.],
        [ 0., -4., -2.,  6.],
        [ 0.,  4., -1.,  5.],
        [-1., -1., -2.,  6.]])
torch.divide(input, other, *, rounding_mode=None, out=None) → Tensor  
Alias for torch.div().
torch.dot(input, other, *, out=None) → Tensor  
Computes the dot product of two 1D tensors.  Note Unlike NumPy’s dot, torch.dot intentionally only supports computing the dot product of two 1D tensors with the same number of elements.   Parameters 
 
input (Tensor) – first tensor in the dot product, must be 1D. 
other (Tensor) – second tensor in the dot product, must be 1D.   Keyword Arguments 
{out} –    Example: >>> torch.dot(torch.tensor([2, 3]), torch.tensor([2, 1]))
tensor(7)
torch.dstack(tensors, *, out=None) → Tensor  
Stack tensors in sequence depthwise (along third axis). This is equivalent to concatenation along the third axis after 1-D and 2-D tensors have been reshaped by torch.atleast_3d().  Parameters 
tensors (sequence of Tensors) – sequence of tensors to concatenate  Keyword Arguments 
out (Tensor, optional) – the output tensor.    Example::

>>> a = torch.tensor([1, 2, 3])
>>> b = torch.tensor([4, 5, 6])
>>> torch.dstack((a,b))
tensor([[[1, 4],
         [2, 5],
         [3, 6]]])
>>> a = torch.tensor([[1],[2],[3]])
>>> b = torch.tensor([[4],[5],[6]])
>>> torch.dstack((a,b))
tensor([[[1, 4]],
        [[2, 5]],
        [[3, 6]]])
torch.eig(input, eigenvectors=False, *, out=None) -> (Tensor, Tensor)  
Computes the eigenvalues and eigenvectors of a real square matrix.  Note Since eigenvalues and eigenvectors might be complex, backward pass is supported only if eigenvalues and eigenvectors are all real valued. When input is on CUDA, torch.eig() causes host-device synchronization.   Parameters 
 
input (Tensor) – the square matrix of shape (n×n)(n \times n)  for which the eigenvalues and eigenvectors will be computed 
eigenvectors (bool) – True to compute both eigenvalues and eigenvectors; otherwise, only eigenvalues will be computed   Keyword Arguments 
out (tuple, optional) – the output tensors  Returns 
A namedtuple (eigenvalues, eigenvectors) containing  
eigenvalues (Tensor): Shape (n×2)(n \times 2) . Each row is an eigenvalue of input, where the first element is the real part and the second element is the imaginary part. The eigenvalues are not necessarily ordered. 
eigenvectors (Tensor): If eigenvectors=False, it’s an empty tensor. Otherwise, this tensor of shape (n×n)(n \times n)  can be used to compute normalized (unit length) eigenvectors of corresponding eigenvalues as follows. If the corresponding eigenvalues[j] is a real number, column eigenvectors[:, j] is the eigenvector corresponding to eigenvalues[j]. If the corresponding eigenvalues[j] and eigenvalues[j + 1] form a complex conjugate pair, then the true eigenvectors can be computed as true eigenvector[j]=eigenvectors[:,j]+i×eigenvectors[:,j+1]\text{true eigenvector}[j] = eigenvectors[:, j] + i \times eigenvectors[:, j + 1] , true eigenvector[j+1]=eigenvectors[:,j]−i×eigenvectors[:,j+1]\text{true eigenvector}[j + 1] = eigenvectors[:, j] - i \times eigenvectors[:, j + 1] .   Return type 
(Tensor, Tensor)   Example: Trivial example with a diagonal matrix. By default, only eigenvalues are computed:

>>> a = torch.diag(torch.tensor([1, 2, 3], dtype=torch.double))
>>> e, v = torch.eig(a)
>>> e
tensor([[1., 0.],
        [2., 0.],
        [3., 0.]], dtype=torch.float64)
>>> v
tensor([], dtype=torch.float64)

Compute also the eigenvectors:

>>> e, v = torch.eig(a, eigenvectors=True)
>>> e
tensor([[1., 0.],
        [2., 0.],
        [3., 0.]], dtype=torch.float64)
>>> v
tensor([[1., 0., 0.],
        [0., 1., 0.],
        [0., 0., 1.]], dtype=torch.float64)
torch.empty(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False) → Tensor  
Returns a tensor filled with uninitialized data. The shape of the tensor is defined by the variable argument size.  Parameters 
size (int...) – a sequence of integers defining the shape of the output tensor. Can be a variable number of arguments or a collection like a list or tuple.  Keyword Arguments 
 
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. 
pin_memory (bool, optional) – If set, returned tensor would be allocated in the pinned memory. Works only for CPU tensors. Default: False. 
memory_format (torch.memory_format, optional) – the desired memory format of returned Tensor. Default: torch.contiguous_format.    Example: >>> torch.empty(2, 3)
tensor(1.00000e-08 *
       [[ 6.3984,  0.0000,  0.0000],
        [ 0.0000,  0.0000,  0.0000]])
torch.empty_like(input, *, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) → Tensor  
Returns an uninitialized tensor with the same size as input. torch.empty_like(input) is equivalent to torch.empty(input.size(), dtype=input.dtype, layout=input.layout, device=input.device).  Parameters 
input (Tensor) – the size of input will determine size of the output tensor.  Keyword Arguments 
 
dtype (torch.dtype, optional) – the desired data type of returned Tensor. Default: if None, defaults to the dtype of input. 
layout (torch.layout, optional) – the desired layout of returned tensor. Default: if None, defaults to the layout of input. 
device (torch.device, optional) – the desired device of returned tensor. Default: if None, defaults to the device of input. 
requires_grad (bool, optional) – If autograd should record operations on the returned tensor. Default: False. 
memory_format (torch.memory_format, optional) – the desired memory format of returned Tensor. Default: torch.preserve_format.    Example: >>> torch.empty((2,3), dtype=torch.int64)
tensor([[ 9.4064e+13,  2.8000e+01,  9.3493e+13],
        [ 7.5751e+18,  7.1428e+18,  7.5955e+18]])
torch.empty_strided(size, stride, *, dtype=None, layout=None, device=None, requires_grad=False, pin_memory=False) → Tensor  
Returns a tensor filled with uninitialized data. The shape and strides of the tensor is defined by the variable argument size and stride respectively. torch.empty_strided(size, stride) is equivalent to torch.empty(size).as_strided(size, stride).  Warning More than one element of the created tensor may refer to a single memory location. As a result, in-place operations (especially ones that are vectorized) may result in incorrect behavior. If you need to write to the tensors, please clone them first.   Parameters 
 
size (tuple of python:ints) – the shape of the output tensor 
stride (tuple of python:ints) – the strides of the output tensor   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()). 
layout (torch.layout, optional) – the desired layout of returned Tensor. Default: torch.strided. 
device (torch.device, optional) – the desired device of returned tensor. Default: if None, uses the current device for the default tensor type (see torch.set_default_tensor_type()). device will be the CPU for CPU tensor types and the current CUDA device for CUDA tensor types. 
requires_grad (bool, optional) – If autograd should record operations on the returned tensor. Default: False. 
pin_memory (bool, optional) – If set, returned tensor would be allocated in the pinned memory. Works only for CPU tensors. Default: False.    Example: >>> a = torch.empty_strided((2, 3), (1, 2))
>>> a
tensor([[8.9683e-44, 4.4842e-44, 5.1239e+07],
        [0.0000e+00, 0.0000e+00, 3.0705e-41]])
>>> a.stride()
(1, 2)
>>> a.size()
torch.Size([2, 3])
class torch.enable_grad [source]
 
Context-manager that enables gradient calculation. Enables gradient calculation, if it has been disabled via no_grad or set_grad_enabled. This context manager is thread local; it will not affect computation in other threads. Also functions as a decorator. (Make sure to instantiate with parenthesis.) Example: >>> x = torch.tensor([1], requires_grad=True)
>>> with torch.no_grad():
...   with torch.enable_grad():
...     y = x * 2
>>> y.requires_grad
True
>>> y.backward()
>>> x.grad
>>> @torch.enable_grad()
... def doubler(x):
...     return x * 2
>>> with torch.no_grad():
...     z = doubler(x)
>>> z.requires_grad
True
torch.eq(input, other, *, out=None) → Tensor  
Computes element-wise equality The second argument can be a number or a tensor whose shape is broadcastable with the first argument.  Parameters 
 
input (Tensor) – the tensor to compare 
other (Tensor or float) – the tensor or value to compare   Keyword Arguments 
out (Tensor, optional) – the output tensor.  Returns 
A boolean tensor that is True where input is equal to other and False elsewhere   Example: >>> torch.eq(torch.tensor([[1, 2], [3, 4]]), torch.tensor([[1, 1], [4, 4]]))
tensor([[ True, False],
        [False, True]])
torch.equal(input, other) → bool  
True if two tensors have the same size and elements, False otherwise. Example: >>> torch.equal(torch.tensor([1, 2]), torch.tensor([1, 2]))
True
torch.erf(input, *, out=None) → Tensor  
Computes the error function of each element. The error function is defined as follows:  erf(x)=2π∫0xe−t2dt\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^2} dt  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.erf(torch.tensor([0, -1., 10.]))
tensor([ 0.0000, -0.8427,  1.0000])
torch.erfc(input, *, out=None) → Tensor  
Computes the complementary error function of each element of input. The complementary error function is defined as follows:  erfc(x)=1−2π∫0xe−t2dt\mathrm{erfc}(x) = 1 - \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^2} dt  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.erfc(torch.tensor([0, -1., 10.]))
tensor([ 1.0000, 1.8427,  0.0000])
torch.erfinv(input, *, out=None) → Tensor  
Computes the inverse error function of each element of input. The inverse error function is defined in the range (−1,1)(-1, 1)  as:  erfinv(erf(x))=x\mathrm{erfinv}(\mathrm{erf}(x)) = x  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.erfinv(torch.tensor([0, 0.5, -1.]))
tensor([ 0.0000,  0.4769,    -inf])
torch.exp(input, *, out=None) → Tensor  
Returns a new tensor with the exponential of the elements of the input tensor input.  yi=exiy_{i} = e^{x_{i}}  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.exp(torch.tensor([0, math.log(2.)]))
tensor([ 1.,  2.])
torch.exp2(input, *, out=None) → Tensor  
Computes the base two exponential function of input.  yi=2xiy_{i} = 2^{x_{i}}  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.exp2(torch.tensor([0, math.log2(2.), 3, 4]))
tensor([ 1.,  2.,  8., 16.])
torch.expm1(input, *, out=None) → Tensor  
Returns a new tensor with the exponential of the elements minus 1 of input.  yi=exi−1y_{i} = e^{x_{i}} - 1  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.expm1(torch.tensor([0, math.log(2.)]))
tensor([ 0.,  1.])
torch.eye(n, m=None, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor  
Returns a 2-D tensor with ones on the diagonal and zeros elsewhere.  Parameters 
 
n (int) – the number of rows 
m (int, optional) – the number of columns with default being n
   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.   Returns 
A 2-D tensor with ones on the diagonal and zeros elsewhere  Return type 
Tensor   Example: >>> torch.eye(3)
tensor([[ 1.,  0.,  0.],
        [ 0.,  1.,  0.],
        [ 0.,  0.,  1.]])
torch.fake_quantize_per_channel_affine(input, scale, zero_point, quant_min, quant_max) → Tensor  
Returns a new tensor with the data in input fake quantized per channel using scale, zero_point, quant_min and quant_max, across the channel specified by axis.  output=min(quant_max,max(quant_min,std::nearby_int(input/scale)+zero_point))\text{output} = min( \text{quant\_max}, max( \text{quant\_min}, \text{std::nearby\_int}(\text{input} / \text{scale}) + \text{zero\_point} ) )  
 Parameters 
 
input (Tensor) – the input value(s), in torch.float32. 
scale (Tensor) – quantization scale, per channel 
zero_point (Tensor) – quantization zero_point, per channel 
axis (int32) – channel axis 
quant_min (int64) – lower bound of the quantized domain 
quant_max (int64) – upper bound of the quantized domain   Returns 
A newly fake_quantized per channel tensor  Return type 
Tensor   Example: >>> x = torch.randn(2, 2, 2)
>>> x
tensor([[[-0.2525, -0.0466],
         [ 0.3491, -0.2168]],

        [[-0.5906,  1.6258],
         [ 0.6444, -0.0542]]])
>>> scales = (torch.randn(2) + 1) * 0.05
>>> scales
tensor([0.0475, 0.0486])
>>> zero_points = torch.zeros(2).to(torch.long)
>>> zero_points
tensor([0, 0])
>>> torch.fake_quantize_per_channel_affine(x, scales, zero_points, 1, 0, 255)
tensor([[[0.0000, 0.0000],
         [0.3405, 0.0000]],

        [[0.0000, 1.6134],
        [0.6323, 0.0000]]])
torch.fake_quantize_per_tensor_affine(input, scale, zero_point, quant_min, quant_max) → Tensor  
Returns a new tensor with the data in input fake quantized using scale, zero_point, quant_min and quant_max.  output=min(quant_max,max(quant_min,std::nearby_int(input/scale)+zero_point))\text{output} = min( \text{quant\_max}, max( \text{quant\_min}, \text{std::nearby\_int}(\text{input} / \text{scale}) + \text{zero\_point} ) )  
 Parameters 
 
input (Tensor) – the input value(s), in torch.float32. 
scale (double) – quantization scale 
zero_point (int64) – quantization zero_point 
quant_min (int64) – lower bound of the quantized domain 
quant_max (int64) – upper bound of the quantized domain   Returns 
A newly fake_quantized tensor  Return type 
Tensor   Example: >>> x = torch.randn(4)
>>> x
tensor([ 0.0552,  0.9730,  0.3973, -1.0780])
>>> torch.fake_quantize_per_tensor_affine(x, 0.1, 0, 0, 255)
tensor([0.1000, 1.0000, 0.4000, 0.0000])
torch.fft.fft(input, n=None, dim=-1, norm=None) → Tensor  
Computes the one dimensional discrete Fourier transform of input.  Note The Fourier domain representation of any real signal satisfies the Hermitian property: X[i] = conj(X[-i]). This function always returns both the positive and negative frequency terms even though, for real inputs, the negative frequencies are redundant. rfft() returns the more compact one-sided representation where only the positive frequencies are returned.   Parameters 
 
input (Tensor) – the input tensor 
n (int, optional) – Signal length. If given, the input will either be zero-padded or trimmed to this length before computing the FFT. 
dim (int, optional) – The dimension along which to take the one dimensional FFT. 
norm (str, optional) – 
Normalization mode. For the forward transform (fft()), these correspond to:  
"forward" - normalize by 1/n
 
"backward" - no normalization 
"ortho" - normalize by 1/sqrt(n) (making the FFT orthonormal)  Calling the backward transform (ifft()) with the same normalization mode will apply an overall normalization of 1/n between the two transforms. This is required to make ifft() the exact inverse. Default is "backward" (no normalization).     Example >>> t = torch.arange(4)
>>> t
tensor([0, 1, 2, 3])
>>> torch.fft.fft(t)
tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j])
 >>> t = tensor([0.+1.j, 2.+3.j, 4.+5.j, 6.+7.j])
>>> torch.fft.fft(t)
tensor([12.+16.j, -8.+0.j, -4.-4.j,  0.-8.j])
torch.fft.fft2(input, s=None, dim=(-2, -1), norm=None) → Tensor  
Computes the 2 dimensional discrete Fourier transform of input. Equivalent to fftn() but FFTs only the last two dimensions by default.  Note The Fourier domain representation of any real signal satisfies the Hermitian property: X[i, j] = conj(X[-i, -j]). This function always returns all positive and negative frequency terms even though, for real inputs, half of these values are redundant. rfft2() returns the more compact one-sided representation where only the positive frequencies of the last dimension are returned.   Parameters 
 
input (Tensor) – the input tensor 
s (Tuple[int], optional) – Signal size in the transformed dimensions. If given, each dimension dim[i] will either be zero-padded or trimmed to the length s[i] before computing the FFT. If a length -1 is specified, no padding is done in that dimension. Default: s = [input.size(d) for d in dim]
 
dim (Tuple[int], optional) – Dimensions to be transformed. Default: last two dimensions. 
norm (str, optional) – 
Normalization mode. For the forward transform (fft2()), these correspond to:  
"forward" - normalize by 1/n
 
"backward" - no normalization 
"ortho" - normalize by 1/sqrt(n) (making the FFT orthonormal)  Where n = prod(s) is the logical FFT size. Calling the backward transform (ifft2()) with the same normalization mode will apply an overall normalization of 1/n between the two transforms. This is required to make ifft2() the exact inverse. Default is "backward" (no normalization).     Example >>> x = torch.rand(10, 10, dtype=torch.complex64)
>>> fft2 = torch.fft.fft2(t)
 The discrete Fourier transform is separable, so fft2() here is equivalent to two one-dimensional fft() calls: >>> two_ffts = torch.fft.fft(torch.fft.fft(x, dim=0), dim=1)
>>> torch.allclose(fft2, two_ffts)