TensorFlow
TensorFlow
TensorFlow is an open source ml library and one of the most popular. it is maintained and
supported by google. It allows us to create and make machine learning models and NNs
without us having a very complex math background.
We start at the lowest level of the graph where nothing is dependent on anything else, then
move out way up the graph and execute the higher levels.
What is a Tensor?
It is just a vector generalised to a higher dimension. A vector can have any number of
dimensions. 2D, 4D or even 5D vectors. So a tensor is a generalization of vectors and matrices
to potentially higher dimensions. TF represents tensors as n-dimensional arrays of base
datatypes. They're the main object in TF which we will work with and manipulate and pass
around. Each tensor will represent a partially defined computation that will eventually
produce a value.
So when we create a program we're going to be creating a bunch of tensors and TF will
create the tensors that will store partially defined computations in the graph. Later when
we build the graph and have the session running, it will run different parts of the graph and
will execute different tensors and get different results from the tensors. each tensor will have a
data type and shape.
Shape
How many items we have in each dimension? and is given using .shape
as long as its a valid shape it will reshape it, its valid if multiplying all the numbers will still be
the number of elements in the tensor