0% found this document useful (0 votes)
14 views

TensorFlow

TensorFlow is an open-source machine learning library maintained by Google, enabling users to create machine learning models and neural networks without requiring extensive mathematical knowledge. It operates through two main components: graphs, which define computations, and sessions, which execute parts of the graph. Tensors, the fundamental objects in TensorFlow, are generalized vectors that can represent data in multiple dimensions and are manipulated to perform computations.

Uploaded by

yomna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

TensorFlow

TensorFlow is an open-source machine learning library maintained by Google, enabling users to create machine learning models and neural networks without requiring extensive mathematical knowledge. It operates through two main components: graphs, which define computations, and sessions, which execute parts of the graph. Tensors, the fundamental objects in TensorFlow, are generalized vectors that can represent data in multiple dimensions and are manipulated to perform computations.

Uploaded by

yomna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

TensorFlow

My Google Colab notebook:


https://colab.research.google.com/drive/1kAKt0x7yjGqmpWekYSlbddBre0GxDbMZ?
usp=sharing
Tutorials Notebook: TensorFlow-Introduction.ipynb - Colaboratory (google.com)

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.

What to do with TensorFlow?


• Image classification
• data clustering
• Regression
• Reinforcement Learning
• NLP
It gives us a library of tool that does the complex math.

How does TensorFlow?


TensorFlow has two main components, to figure out how the operations of math are actually
performed. The two main components are Graphs and sessions. When we write a code in TF
we create a graph. For example if we wrote a=2 b=0 c= a+b then this will be a graph that
says variable c is equal to the sum of a and b and it doesn't evaluate it, it just defines the
computation. It writes down the equation but doesn't solve it. A session is a way to compute
part or the whole graph. When we start a session we start executing different parts of the
graph.

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.

Data type is what kind of information is stored in a tensor.

Rank and Degree of a tensor


A rank or degree of a tensor is simply it's dimension. A tensor with rank zero is a tensor that
is scalar. A rank one tensor is when we have a list in the tensor, when we have only one list. A
rank two tensor is when we have two lists or arrays or objects.

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

You might also like