Vector
A vector is a two-dimensional object with both magnitude and direction. we can interpret vector geometrically as a directed line segment with an arrow showing the direction and a length of the line equal to the magnitude of the vector. below is an example of creating a vector in TensorFlow.
Python3
# importing packages import tensorflow as tf # create a vector vector = tf.constant([ 10 , 10 ]) # checking the dimensions of vector vector.ndim |
Output:
1
Mathematical Foundations in Tensorflow
Before constructing a basic TensorFlow program, it’s critical to grasp the mathematical ideas required for TensorFlow. Any machine learning algorithm’s core is considered mathematics. A strategy or solution for a certain machine learning algorithm is established with the aid of key mathematical principles. Let’s dive into the mathematical foundations of TensorFlow.