TensorFlow Sec1
TensorFlow Sec1
TensorFlow
• TensorFlow is an open source machine learning framework for all
developers. It is used for implementing machine learning and deep
learning applications. To develop and research on fascinating ideas on
artificial intelligence, Google team created TensorFlow. TensorFlow is
designed in Python programming language, hence it is considered an
easy to understand framework.
TensorFlow (Cont.)
• TensorFlow is a software library or framework, designed by the
Google team to implement machine learning and deep learning
concepts in the easiest manner. It combines the computational
algebra of optimization techniques for easy calculation of many
mathematical expressions.
TensorFlow (Cont.)
• TensorFlow is also called a “Google” product. It includes a variety of
machine learning and deep learning algorithms. TensorFlow can train
and run deep neural networks for handwritten digit classification,
image recognition, word embedding and creation of various sequence
models.
TensorFlow Installation
• To install TensorFlow, it is important to have “Python” installed in your
system.
• A user can pick up any mechanism to install TensorFlow in the system.
We recommend “pip” and “Anaconda”. Pip is a command used for
executing and installing modules in Python.
• For Installation:
Tensor Data Structure
• Tensors are used as the basic data structures in TensorFlow language.
Tensors represent the connecting edges in any flow diagram called
the Data Flow Graph. Tensors are defined as multidimensional array
or list.
Tensor Data Structure (Cont.)
• Tensors are identified by the following three parameters:
1) Rank: Unit of dimensionality described within tensor is called rank. It
identifies the number of dimensions of the tensor. A rank of a tensor can be
described as the order or n-dimensions of a tensor defined.
2) Shape: The number of rows and columns together define the shape of Tensor.
3) Type: describes the data type assigned to Tensor’s elements.
Deep Learning
• There are two important types for deep neural network:
1) Convolutional Neural Network
2) Recurrent Neural Network
Convolutional Neural Network
• Convolutional Neural networks are designed to process data through
multiple layers of arrays. This type of neural networks is used in
applications like image recognition or face recognition.
• The primary difference between CNN and any other ordinary neural
network is that CNN takes input as a two-dimensional array and
operates directly on the images rather than focusing on feature
extraction which other neural networks focus on.
Convolutional Neural Network
(Cont.)
• A convolutional neural network uses three basic ideas:
1) Local respective fields
2) Convolution
3) Pooling
Convolutional Neural Network (Cont.)
1) Local respective fields
• CNN utilizes spatial correlations that exist within the input data. Each
concurrent layer of a neural network connects some input neurons.
This specific region is called local receptive field. Local receptive field
focusses on the hidden neurons. The hidden neurons process the
input data inside the mentioned field not realizing the changes
outside the specific boundary.
Convolutional Neural Network (Cont.)
Convolutional Neural Network (Cont.)
• If we observe the above representation, each connection learns a weight of
the hidden neuron with an associated connection with movement from
one layer to another. Here, individual neurons perform a shift from time to
time. This process is called “convolution”.
• The mapping of connections from the input layer to the hidden feature
map is defined as “shared weights” and bias included is called “shared
bias”.
Convolutional Neural Network (Cont.)
• CNN or convolutional neural networks use pooling layers, which are
the layers, positioned immediately after CNN declaration. It takes the
input from the user as a feature map that comes out of convolutional
networks and prepares a condensed feature map. Pooling layers
helps in creating layers with neurons of previous layers.