torch_numopt.utils.param_operations#
Functions
|
Element-wise addition of two parameter groups. |
|
Return a tuple of indices (0, 1, ..., len(params)-1) for the parameter groups. |
|
Creates a deep copy of a parameter group (each tensor cloned). |
|
Detach (and clone) all tensors from the computation graph. |
|
Element-wise subtraction of two parameter groups. |
|
Computes the dot product between two parameter groups treated as a single flat vector. |
|
Flattens an entire parameter group into a single 1-dimensional tensor. |
|
Checks that all elements in a parameter group are finite. |
|
Element-wise (Hadamard) product of two parameter groups. |
|
Negates every tensor in a parameter group. |
|
Euclidean (L2) norm of a parameter group treated as a flat vector. |
|
Returns the total amount of parameters. |
|
Reshapes a vector into a sequence of matrices with the same shapes as the params parameter. |
|
Multiplies every tensor in a parameter group by a scalar. |
|
Computes params_a + scale * params_b element-wise. |
|
Obtains the shape of every matrix in the parameters provided. |
|
Transposes every 2-dimensional tensor in the parameter group. |
|
Create a tuple of zero tensors with the same shapes as the input parameters. |