Note
Go to the end to download the full example code.
Custom Extensions#
Custom functions (extensions) are easy to implement in tensortrax. Beside the function expression, three additional (dual) variation expressions have to be defined.
Note
Contrary to NumPy’s w, v = np.linalg.eigh(C), which returns eigenvalues and
-vectors, the differentiable w, M = tm.linalg.eigh(C) function returns
eigenvalues and eigenbases of symmetric real-valued tensors.
Tip
Feel free to contribute missing math-functions to src/tensortrax/math/_math_tensor.py 📃 ✏️.
Total running time of the script: (0 minutes 0.001 seconds)