expm

class torch_sim.math.expm(*args, **kwargs)[source]

Bases: Function

Compute the matrix exponential of a matrix or batch of matrices.

static forward(ctx, A)[source]

Compute the matrix exponential of A.

Parameters:
  • ctx (Any) – ctx

  • A (Tensor) – Input matrix or batch of matrices

Returns:

Matrix exponential of A

Return type:

Tensor

static backward(ctx, grad_output)[source]

Compute the gradient of matrix exponential.

Parameters:
  • ctx (Any) – ctx

  • grad_output (Tensor) – Gradient with respect to the output

Returns:

Gradient with respect to the input

Return type:

Tensor