neulab/docprompting-conala huggingface dataset:
tf.xla.experimental.jit_scope     View source on GitHub    Enable or disable JIT compilation of operators within the scope.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.xla.experimental.jit_scope  
@contextlib.contextmanager
tf.xla.experimental.jit_scope(
    compile_ops=True, separate_compiled_gradients=False
)
 
Note: This is an experimental feature.
 The compilation is a hint and only supported on a best-effort basis. Example usage: with tf.xla.experimental.jit_scope():
  c = tf.matmul(a, b)  # compiled
with tf.xla.experimental.jit_scope(compile_ops=False):
  d = tf.matmul(a, c)  # not compiled
with tf.xla.experimental.jit_scope(
    compile_ops=lambda node_def: 'matmul' in node_def.op.lower()):
  e = tf.matmul(a, b) + d  # matmul is compiled, the addition is not.
 Example of separate_compiled_gradients: # In the example below, the computations for f, g and h will all be compiled
# in separate scopes.
with tf.xla.experimental.jit_scope(
    separate_compiled_gradients=True):
  f = tf.matmul(a, b)
g = tf.gradients([f], [a, b], name='mygrads1')
h = tf.gradients([f], [a, b], name='mygrads2')
 Ops that are not in the scope may be clustered and compiled with ops in the scope with compile_ops=True, while the ops in the scope with compile_ops=False will never be compiled. For example: # In the example below, x and loss may be clustered and compiled together,
# while y will not be compiled.
with tf.xla.experimental.jit_scope():
  x = tf.matmul(a, b)
with tf.xla.experimental.jit_scope(compile_ops=False):
  y = tf.matmul(c, d)
loss = x + y
 If you want to only compile the ops in the scope with compile_ops=True, consider adding an outer jit_scope(compile_ops=False): # In the example below, only x will be compiled.
with tf.xla.experimental.jit_scope(compile_ops=False):
  with tf.xla.experimental.jit_scope():
    x = tf.matmul(a, b)
  y = tf.matmul(c, d)
  loss = x + y

 


 Args
  compile_ops   Whether to enable or disable compilation in the scope. Either a Python bool, or a callable that accepts the parameter node_def and returns a python bool.  
  separate_compiled_gradients   If true put each gradient subgraph into a separate compilation scope. This gives fine-grained control over which portions of the graph will be compiled as a single unit. Compiling gradients separately may yield better performance for some graphs. The scope is named based on the scope of the forward computation as well as the name of the gradients. As a result, the gradients will be compiled in a scope that is separate from both the forward computation, and from other gradients.   
 


 Raises
  RuntimeError   if called when eager execution is enabled.   
 


 Yields   The current scope, enabling or disabling compilation.
tf.zeros     View source on GitHub    Creates a tensor with all elements set to zero.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.zeros  
tf.zeros(
    shape, dtype=tf.dtypes.float32, name=None
)
 See also tf.zeros_like, tf.ones, tf.fill, tf.eye. This operation returns a tensor of type dtype with shape shape and all elements set to zero. 
tf.zeros([3, 4], tf.int32)
<tf.Tensor: shape=(3, 4), dtype=int32, numpy=
array([[0, 0, 0, 0],
       [0, 0, 0, 0],
       [0, 0, 0, 0]], dtype=int32)>

 


 Args
  shape   A list of integers, a tuple of integers, or a 1-D Tensor of type int32.  
  dtype   The DType of an element in the resulting Tensor.  
  name   Optional string. A name for the operation.   
 


 Returns   A Tensor with all elements set to zero.
tf.zeros_initializer     View source on GitHub    Initializer that generates tensors initialized to 0. Initializers allow you to pre-specify an initialization strategy, encoded in the Initializer object, without knowing the shape and dtype of the variable being initialized. Examples: 
def make_variables(k, initializer):
  return (tf.Variable(initializer(shape=[k], dtype=tf.float32)),
          tf.Variable(initializer(shape=[k, k], dtype=tf.float32)))
v1, v2 = make_variables(3, tf.zeros_initializer())
v1
<tf.Variable ... shape=(3,) ... numpy=array([0., 0., 0.], dtype=float32)>
v2
<tf.Variable ... shape=(3, 3) ... numpy=
array([[0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.]], dtype=float32)>
make_variables(4, tf.random_uniform_initializer(minval=-1., maxval=1.))
(<tf.Variable...shape=(4,) dtype=float32...>, <tf.Variable...shape=(4, 4) ...
 Methods from_config View source 
@classmethod
from_config(
    config
)
 Instantiates an initializer from a configuration dictionary. Example: initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)

 


 Args
  config   A Python dictionary. It will typically be the output of get_config.   
 


 Returns   An Initializer instance.  
 get_config View source 
get_config()
 Returns the configuration of the initializer as a JSON-serializable dict.
 


 Returns   A JSON-serializable Python dict.  
 __call__ View source 
__call__(
    shape, dtype=tf.dtypes.float32, **kwargs
)
 Returns a tensor object initialized as specified by the initializer.
 


 Args
  shape   Shape of the tensor.  
  dtype   Optional dtype of the tensor. Only numeric or boolean dtypes are supported.  
  **kwargs   Additional keyword arguments.   
 


 Raises
  ValuesError   If the dtype is not numeric or boolean.
tf.zeros_like     View source on GitHub    Creates a tensor with all elements set to zero. 
tf.zeros_like(
    input, dtype=None, name=None
)
 See also tf.zeros. Given a single tensor or array-like object (input), this operation returns a tensor of the same type and shape as input with all elements set to zero. Optionally, you can use dtype to specify a new type for the returned tensor. Examples: 
tensor = tf.constant([[1, 2, 3], [4, 5, 6]])
tf.zeros_like(tensor)
<tf.Tensor: shape=(2, 3), dtype=int32, numpy=
array([[0, 0, 0],
       [0, 0, 0]], dtype=int32)>
 
tf.zeros_like(tensor, dtype=tf.float32)
<tf.Tensor: shape=(2, 3), dtype=float32, numpy=
array([[0., 0., 0.],
       [0., 0., 0.]], dtype=float32)>
 
tf.zeros_like([[1, 2, 3], [4, 5, 6]])
<tf.Tensor: shape=(2, 3), dtype=int32, numpy=
array([[0, 0, 0],
       [0, 0, 0]], dtype=int32)>

 


 Args
  input   A Tensor or array-like object.  
  dtype   A type for the returned Tensor. Must be float16, float32, float64, int8, uint8, int16, uint16, int32, int64, complex64, complex128, bool or string (optional).  
  name   A name for the operation (optional).   
 


 Returns   A Tensor with all elements set to zero.
torch.abs(input, *, out=None) → Tensor  
Computes the absolute value of each element in input.  outi=∣inputi∣\text{out}_{i} = |\text{input}_{i}|  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> torch.abs(torch.tensor([-1, -2, 3]))
tensor([ 1,  2,  3])
torch.absolute(input, *, out=None) → Tensor  
Alias for torch.abs()
torch.acos(input, *, out=None) → Tensor  
Computes the inverse cosine of each element in input.  outi=cos⁡−1(inputi)\text{out}_{i} = \cos^{-1}(\text{input}_{i})  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> a = torch.randn(4)
>>> a
tensor([ 0.3348, -0.5889,  0.2005, -0.1584])
>>> torch.acos(a)
tensor([ 1.2294,  2.2004,  1.3690,  1.7298])
torch.acosh(input, *, out=None) → Tensor  
Returns a new tensor with the inverse hyperbolic cosine of the elements of input.  Note The domain of the inverse hyperbolic cosine is [1, inf) and values outside this range will be mapped to NaN, except for + INF for which the output is mapped to + INF.   outi=cosh⁡−1(inputi)\text{out}_{i} = \cosh^{-1}(\text{input}_{i})  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> a = torch.randn(4).uniform_(1, 2)
>>> a
tensor([ 1.3192, 1.9915, 1.9674, 1.7151 ])
>>> torch.acosh(a)
tensor([ 0.7791, 1.3120, 1.2979, 1.1341 ])
torch.add(input, other, *, out=None)  
Adds the scalar other to each element of the input input and returns a new resulting tensor.  out=input+other\text{out} = \text{input} + \text{other}  
If input is of type FloatTensor or DoubleTensor, other must be a real number, otherwise it should be an integer.  Parameters 
 
input (Tensor) – the input tensor. 
value (Number) – the number to be added to each element of input
   Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> a = torch.randn(4)
>>> a
tensor([ 0.0202,  1.0985,  1.3506, -0.6056])
>>> torch.add(a, 20)
tensor([ 20.0202,  21.0985,  21.3506,  19.3944])
  
torch.add(input, other, *, alpha=1, out=None) 
 Each element of the tensor other is multiplied by the scalar alpha and added to each element of the tensor input. The resulting tensor is returned. The shapes of input and other must be broadcastable.  out=input+alpha×other\text{out} = \text{input} + \text{alpha} \times \text{other}  
If other is of type FloatTensor or DoubleTensor, alpha must be a real number, otherwise it should be an integer.  Parameters 
 
input (Tensor) – the first input tensor 
other (Tensor) – the second input tensor   Keyword Arguments 
 
alpha (Number) – the scalar multiplier for other
 
out (Tensor, optional) – the output tensor.    Example: >>> a = torch.randn(4)
>>> a
tensor([-0.9732, -0.3497,  0.6245,  0.4022])
>>> b = torch.randn(4, 1)
>>> b
tensor([[ 0.3743],
        [-1.7724],
        [-0.5811],
        [-0.8017]])
>>> torch.add(a, b, alpha=10)
tensor([[  2.7695,   3.3930,   4.3672,   4.1450],
        [-18.6971, -18.0736, -17.0994, -17.3216],
        [ -6.7845,  -6.1610,  -5.1868,  -5.4090],
        [ -8.9902,  -8.3667,  -7.3925,  -7.6147]])
torch.addbmm(input, batch1, batch2, *, beta=1, alpha=1, out=None) → Tensor  
Performs a batch matrix-matrix product of matrices stored in batch1 and batch2, with a reduced add step (all matrix multiplications get accumulated along the first dimension). input is added to the final result. batch1 and batch2 must be 3-D tensors each containing the same number of matrices. If batch1 is a (b×n×m)(b \times n \times m)  tensor, batch2 is a (b×m×p)(b \times m \times p)  tensor, input must be broadcastable with a (n×p)(n \times p)  tensor and out will be a (n×p)(n \times p)  tensor.  out=β input+α(∑i=0b−1batch1i@batch2i)out = \beta\ \text{input} + \alpha\ (\sum_{i=0}^{b-1} \text{batch1}_i \mathbin{@} \text{batch2}_i)  
If beta is 0, then input will be ignored, and nan and inf in it will not be propagated. For inputs of type FloatTensor or DoubleTensor, arguments beta and alpha must be real numbers, otherwise they should be integers. This operator supports TensorFloat32.  Parameters 
 
batch1 (Tensor) – the first batch of matrices to be multiplied 
batch2 (Tensor) – the second batch of matrices to be multiplied   Keyword Arguments 
 
beta (Number, optional) – multiplier for input (β\beta ) 
input (Tensor) – matrix to be added 
alpha (Number, optional) – multiplier for batch1 @ batch2 (α\alpha ) 
out (Tensor, optional) – the output tensor.    Example: >>> M = torch.randn(3, 5)
>>> batch1 = torch.randn(10, 3, 4)
>>> batch2 = torch.randn(10, 4, 5)
>>> torch.addbmm(M, batch1, batch2)
tensor([[  6.6311,   0.0503,   6.9768, -12.0362,  -2.1653],
        [ -4.8185,  -1.4255,  -6.6760,   8.9453,   2.5743],
        [ -3.8202,   4.3691,   1.0943,  -1.1109,   5.4730]])
torch.addcdiv(input, tensor1, tensor2, *, value=1, out=None) → Tensor  
Performs the element-wise division of tensor1 by tensor2, multiply the result by the scalar value and add it to input.  Warning Integer division with addcdiv is no longer supported, and in a future release addcdiv will perform a true division of tensor1 and tensor2. The historic addcdiv behavior can be implemented as (input + value * torch.trunc(tensor1 / tensor2)).to(input.dtype) for integer inputs and as (input + value * tensor1 / tensor2) for float inputs. The future addcdiv behavior is just the latter implementation: (input + value * tensor1 / tensor2), for all dtypes.   outi=inputi+value×tensor1itensor2i\text{out}_i = \text{input}_i + \text{value} \times \frac{\text{tensor1}_i}{\text{tensor2}_i}  
The shapes of input, tensor1, and tensor2 must be broadcastable. For inputs of type FloatTensor or DoubleTensor, value must be a real number, otherwise an integer.  Parameters 
 
input (Tensor) – the tensor to be added 
tensor1 (Tensor) – the numerator tensor 
tensor2 (Tensor) – the denominator tensor   Keyword Arguments 
 
value (Number, optional) – multiplier for tensor1/tensor2\text{tensor1} / \text{tensor2} 
 
out (Tensor, optional) – the output tensor.    Example: >>> t = torch.randn(1, 3)
>>> t1 = torch.randn(3, 1)
>>> t2 = torch.randn(1, 3)
>>> torch.addcdiv(t, t1, t2, value=0.1)
tensor([[-0.2312, -3.6496,  0.1312],
        [-1.0428,  3.4292, -0.1030],
        [-0.5369, -0.9829,  0.0430]])
torch.addcmul(input, tensor1, tensor2, *, value=1, out=None) → Tensor  
Performs the element-wise multiplication of tensor1 by tensor2, multiply the result by the scalar value and add it to input.  outi=inputi+value×tensor1i×tensor2i\text{out}_i = \text{input}_i + \text{value} \times \text{tensor1}_i \times \text{tensor2}_i  
The shapes of tensor, tensor1, and tensor2 must be broadcastable. For inputs of type FloatTensor or DoubleTensor, value must be a real number, otherwise an integer.  Parameters 
 
input (Tensor) – the tensor to be added 
tensor1 (Tensor) – the tensor to be multiplied 
tensor2 (Tensor) – the tensor to be multiplied   Keyword Arguments 
 
value (Number, optional) – multiplier for tensor1.∗tensor2tensor1 .* tensor2 
 
out (Tensor, optional) – the output tensor.    Example: >>> t = torch.randn(1, 3)
>>> t1 = torch.randn(3, 1)
>>> t2 = torch.randn(1, 3)
>>> torch.addcmul(t, t1, t2, value=0.1)
tensor([[-0.8635, -0.6391,  1.6174],
        [-0.7617, -0.5879,  1.7388],
        [-0.8353, -0.6249,  1.6511]])
torch.addmm(input, mat1, mat2, *, beta=1, alpha=1, out=None) → Tensor  
Performs a matrix multiplication of the matrices mat1 and mat2. The matrix input is added to the final result. If mat1 is a (n×m)(n \times m)  tensor, mat2 is a (m×p)(m \times p)  tensor, then input must be broadcastable with a (n×p)(n \times p)  tensor and out will be a (n×p)(n \times p)  tensor. alpha and beta are scaling factors on matrix-vector product between mat1 and mat2 and the added matrix input respectively.  out=β input+α(mat1i@mat2i)\text{out} = \beta\ \text{input} + \alpha\ (\text{mat1}_i \mathbin{@} \text{mat2}_i)  
If beta is 0, then input will be ignored, and nan and inf in it will not be propagated. For inputs of type FloatTensor or DoubleTensor, arguments beta and alpha must be real numbers, otherwise they should be integers. This operator supports TensorFloat32.  Parameters 
 
input (Tensor) – matrix to be added 
mat1 (Tensor) – the first matrix to be matrix multiplied 
mat2 (Tensor) – the second matrix to be matrix multiplied   Keyword Arguments 
 
beta (Number, optional) – multiplier for input (β\beta ) 
alpha (Number, optional) – multiplier for mat1@mat2mat1 @ mat2  (α\alpha ) 
out (Tensor, optional) – the output tensor.    Example: >>> M = torch.randn(2, 3)
>>> mat1 = torch.randn(2, 3)
>>> mat2 = torch.randn(3, 3)
>>> torch.addmm(M, mat1, mat2)
tensor([[-4.8716,  1.4671, -1.3746],
        [ 0.7573, -3.9555, -2.8681]])
torch.addmv(input, mat, vec, *, beta=1, alpha=1, out=None) → Tensor  
Performs a matrix-vector product of the matrix mat and the vector vec. The vector input is added to the final result. If mat is a (n×m)(n \times m)  tensor, vec is a 1-D tensor of size m, then input must be broadcastable with a 1-D tensor of size n and out will be 1-D tensor of size n. alpha and beta are scaling factors on matrix-vector product between mat and vec and the added tensor input respectively.  out=β input+α(mat@vec)\text{out} = \beta\ \text{input} + \alpha\ (\text{mat} \mathbin{@} \text{vec})  
If beta is 0, then input will be ignored, and nan and inf in it will not be propagated. For inputs of type FloatTensor or DoubleTensor, arguments beta and alpha must be real numbers, otherwise they should be integers  Parameters 
 
input (Tensor) – vector to be added 
mat (Tensor) – matrix to be matrix multiplied 
vec (Tensor) – vector to be matrix multiplied   Keyword Arguments 
 
beta (Number, optional) – multiplier for input (β\beta ) 
alpha (Number, optional) – multiplier for mat@vecmat @ vec  (α\alpha ) 
out (Tensor, optional) – the output tensor.    Example: >>> M = torch.randn(2)
>>> mat = torch.randn(2, 3)
>>> vec = torch.randn(3)
>>> torch.addmv(M, mat, vec)
tensor([-0.3768, -5.5565])
torch.addr(input, vec1, vec2, *, beta=1, alpha=1, out=None) → Tensor  
Performs the outer-product of vectors vec1 and vec2 and adds it to the matrix input. Optional values beta and alpha are scaling factors on the outer product between vec1 and vec2 and the added matrix input respectively.  out=β input+α(vec1⊗vec2)\text{out} = \beta\ \text{input} + \alpha\ (\text{vec1} \otimes \text{vec2})  
If beta is 0, then input will be ignored, and nan and inf in it will not be propagated. If vec1 is a vector of size n and vec2 is a vector of size m, then input must be broadcastable with a matrix of size (n×m)(n \times m)  and out will be a matrix of size (n×m)(n \times m) .  Parameters 
 
input (Tensor) – matrix to be added 
vec1 (Tensor) – the first vector of the outer product 
vec2 (Tensor) – the second vector of the outer product   Keyword Arguments 
 
beta (Number, optional) – multiplier for input (β\beta ) 
alpha (Number, optional) – multiplier for vec1⊗vec2\text{vec1} \otimes \text{vec2}  (α\alpha ) 
out (Tensor, optional) – the output tensor.    Example: >>> vec1 = torch.arange(1., 4.)
>>> vec2 = torch.arange(1., 3.)
>>> M = torch.zeros(3, 2)
>>> torch.addr(M, vec1, vec2)
tensor([[ 1.,  2.],
        [ 2.,  4.],
        [ 3.,  6.]])
torch.all(input) → Tensor  
Tests if all elements in input evaluate to True.  Note This function matches the behaviour of NumPy in returning output of dtype bool for all supported dtypes except uint8. For uint8 the dtype of output is uint8 itself.  Example: >>> a = torch.rand(1, 2).bool()
>>> a
tensor([[False, True]], dtype=torch.bool)
>>> torch.all(a)
tensor(False, dtype=torch.bool)
>>> a = torch.arange(0, 3)
>>> a
tensor([0, 1, 2])
>>> torch.all(a)
tensor(False)
  
torch.all(input, dim, keepdim=False, *, out=None) → Tensor 
 For each row of input in the given dimension dim, returns True if all elements in the row evaluate to True and False otherwise. If keepdim is True, the output tensor is of the same size as input except in the dimension dim where it is of size 1. Otherwise, dim is squeezed (see torch.squeeze()), resulting in the output tensor having 1 fewer dimension than input.  Parameters 
 
input (Tensor) – the input tensor. 
dim (int) – the dimension to reduce. 
keepdim (bool) – whether the output tensor has dim retained or not.   Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> a = torch.rand(4, 2).bool()
>>> a
tensor([[True, True],
        [True, False],
        [True, True],
        [True, True]], dtype=torch.bool)
>>> torch.all(a, dim=1)
tensor([ True, False,  True,  True], dtype=torch.bool)
>>> torch.all(a, dim=0)
tensor([ True, False], dtype=torch.bool)
torch.allclose(input, other, rtol=1e-05, atol=1e-08, equal_nan=False) → bool  
This function checks if all input and other satisfy the condition:  ∣input−other∣≤atol+rtol×∣other∣\lvert \text{input} - \text{other} \rvert \leq \texttt{atol} + \texttt{rtol} \times \lvert \text{other} \rvert  
elementwise, for all elements of input and other. The behaviour of this function is analogous to numpy.allclose  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
    Example: >>> torch.allclose(torch.tensor([10000., 1e-07]), torch.tensor([10000.1, 1e-08]))
False
>>> torch.allclose(torch.tensor([10000., 1e-08]), torch.tensor([10000.1, 1e-09]))
True
>>> torch.allclose(torch.tensor([1.0, float('nan')]), torch.tensor([1.0, float('nan')]))
False
>>> torch.allclose(torch.tensor([1.0, float('nan')]), torch.tensor([1.0, float('nan')]), equal_nan=True)
True
torch.amax(input, dim, keepdim=False, *, out=None) → Tensor  
Returns the maximum value of each slice of the input tensor in the given dimension(s) dim.  Note  
The difference between max/min and amax/amin is: 

 
amax/amin supports reducing on multiple dimensions, 
amax/amin does not return indices, 
amax/amin evenly distributes gradient between equal values, while max(dim)/min(dim) propagates gradient only to a single index in the source tensor.     If keepdim is ``True`, the output tensors are of the same size as input except in the dimension(s) dim where they are of size 1. Otherwise, dim`s are squeezed (see :func:`torch.squeeze), resulting in the output tensors having fewer dimension than input.  Parameters 
 
input (Tensor) – the input tensor. 
dim (int or tuple of python:ints) – the dimension or dimensions to reduce. 
keepdim (bool) – whether the output tensor has dim retained or not.   Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> a = torch.randn(4, 4)
>>> a
tensor([[ 0.8177,  1.4878, -0.2491,  0.9130],
        [-0.7158,  1.1775,  2.0992,  0.4817],
        [-0.0053,  0.0164, -1.3738, -0.0507],
        [ 1.9700,  1.1106, -1.0318, -1.0816]])
>>> torch.amax(a, 1)
tensor([1.4878, 2.0992, 0.0164, 1.9700])
torch.amin(input, dim, keepdim=False, *, out=None) → Tensor  
Returns the minimum value of each slice of the input tensor in the given dimension(s) dim.  Note  
The difference between max/min and amax/amin is: 

 
amax/amin supports reducing on multiple dimensions, 
amax/amin does not return indices, 
amax/amin evenly distributes gradient between equal values, while max(dim)/min(dim) propagates gradient only to a single index in the source tensor.     If keepdim is True, the output tensors are of the same size as input except in the dimension(s) dim where they are of size 1. Otherwise, dim`s are squeezed (see :func:`torch.squeeze), resulting in the output tensors having fewer dimensions than input.  Parameters 
 
input (Tensor) – the input tensor. 
dim (int or tuple of python:ints) – the dimension or dimensions to reduce. 
keepdim (bool) – whether the output tensor has dim retained or not.   Keyword Arguments 
out (Tensor, optional) – the output tensor.   Example: >>> a = torch.randn(4, 4)
>>> a
tensor([[ 0.6451, -0.4866,  0.2987, -1.3312],
        [-0.5744,  1.2980,  1.8397, -0.2713],
        [ 0.9128,  0.9214, -1.7268, -0.2995],
        [ 0.9023,  0.4853,  0.9075, -1.6165]])
>>> torch.amin(a, 1)
tensor([-1.3312, -0.5744, -1.7268, -1.6165])
torch.angle(input, *, out=None) → Tensor  
Computes the element-wise angle (in radians) of the given input tensor.  outi=angle(inputi)\text{out}_{i} = angle(\text{input}_{i})  
 Parameters 
input (Tensor) – the input tensor.  Keyword Arguments 
out (Tensor, optional) – the output tensor.    Note Starting in PyTorch 1.8, angle returns pi for negative real numbers, zero for non-negative real numbers, and propagates NaNs. Previously the function would return zero for all real numbers and not propagate floating-point NaNs.  Example: >>> torch.angle(torch.tensor([-1 + 1j, -2 + 2j, 3 - 3j]))*180/3.14159
tensor([ 135.,  135,  -45])