Declaring operations
Apart from matrix operations, there are hosts of other TensorFlow operations we must at least be aware of. This recipe will provide you with a quick and essential glance at what you really need to know.
Getting ready
Besides the standard arithmetic operations, TensorFlow provides us with more operations that we should be aware of. We should acknowledge them and learn how to use them before proceeding. Again, we just import TensorFlow:
import tensorflow as tf
Now we're ready to run the code to be found in the following section.
How to do it…
TensorFlow has the standard operations on tensors, that is, add()
, subtract()
, multiply()
, and division()
in its math
module. Note that all of the operations in this section will evaluate the inputs elementwise, unless specified otherwise:
- TensorFlow provides some variations of
division()
and the relevant functions. - It is worth mentioning that
division()
returns the same...