Aussie AI
Unary Tensor Operations
-
Book Excerpt from "Generative AI in C++"
-
by David Spuler, Ph.D.
Unary Tensor Operations
Like a 2-D matrix, there are various simple operations we can define on a single tensor. The various element-wise operations apply individually to each tensor item.
- Clear or set to a value
- Add or subtract a scalar
- Multiply or divide by a scalar
Similarly, we could apply a particular unary mathematical function to each element separately: square root, exponentiation, natural logarithm, and more.
• Next: • Up: Table of Contents |
The new AI programming book by Aussie AI co-founders:
Get your copy from Amazon: Generative AI in C++ |