tf.linalg.expm
Stay organized with collections
Save and categorize content based on your preferences.
Computes the matrix exponential of one or more square matrices.
tf.linalg.expm(
input, name=None
)
\[exp(A) = \sum_{n=0}^\infty A^n/n!\]
The exponential is computed using a combination of the scaling and squaring
method and the Pade approximation. Details can be found in:
Nicholas J. Higham, "The scaling and squaring method for the matrix
exponential revisited," SIAM J. Matrix Anal. Applic., 26:1179-1193, 2005.
The input is a tensor of shape [..., M, M]
whose inner-most 2 dimensions
form square matrices. The output is a tensor of the same shape as the input
containing the exponential for all input submatrices [..., :, :]
.
Args |
input
|
A Tensor . Must be float16 , float32 , float64 , complex64 , or
complex128 with shape [..., M, M] .
|
name
|
A name to give this Op (optional).
|
Returns |
the matrix exponential of the input.
|
Raises |
ValueError
|
An unsupported type is provided as input.
|
Equivalent to scipy.linalg.expm
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.linalg.expm\n\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/linalg/linalg_impl.py#L232-L347) |\n\nComputes the matrix exponential of one or more square matrices.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.linalg.expm`](https://www.tensorflow.org/api_docs/python/tf/linalg/expm)\n\n\u003cbr /\u003e\n\n tf.linalg.expm(\n input, name=None\n )\n\n\\\\\\[exp(A) = \\\\sum_{n=0}\\^\\\\infty A\\^n/n!\\\\\\]\n\nThe exponential is computed using a combination of the scaling and squaring\nmethod and the Pade approximation. Details can be found in:\nNicholas J. Higham, \"The scaling and squaring method for the matrix\nexponential revisited,\" SIAM J. Matrix Anal. Applic., 26:1179-1193, 2005.\n\nThe input is a tensor of shape `[..., M, M]` whose inner-most 2 dimensions\nform square matrices. The output is a tensor of the same shape as the input\ncontaining the exponential for all input submatrices `[..., :, :]`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|-------------------------------------------------------------------------------------------------------------|\n| `input` | A `Tensor`. Must be `float16`, `float32`, `float64`, `complex64`, or `complex128` with shape `[..., M, M]`. |\n| `name` | A name to give this `Op` (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| the matrix exponential of the input. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-------------------------------------------|\n| `ValueError` | An unsupported type is provided as input. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nscipy compatibility\n-------------------\n\n\u003cbr /\u003e\n\nEquivalent to scipy.linalg.expm\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]