Hi,
Could it be possible to have the exponent parameter in matrix_power be either a single float number or a Tensor with the same number of elements as X ?
Then, when exponent is a tensor, the output would be $\text{out}_i = X_i^{\text{exponent}_i}$.
This would match PyTorch's torch.pow.
Cheers,