0% found this document useful (0 votes)
20 views6 pages

CHP 3

Uploaded by

Pruthavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

CHP 3

Uploaded by

Pruthavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

TensorFlow

TensorFlow is the world’s most used library for Machine Learning. Developed in
2015 by the Google Brain Team, it ensures to provide an easy-to-use low-level
toolkit that can handle complex mathematical operations and learning
architectures.

TensorFlow is a popular framework of machine learning and deep learning. It


is a free and open-source library which is released on 9 November 2015 and
developed by Google Brain Team. It is entirely based on Python programming
language and use for numerical computation and data flow, which makes machine
learning faster and easier.

TensorFlow can train and run the deep neural networks for image recognition,
handwritten digit classification, recurrent neural network, word
embedding, natural language processing, video detection, and many more.
TensorFlow is run on multiple CPUs or GPUs and also mobile operating systems.

The word TensorFlow is made by two words, i.e., Tensor and Flow

1. Tensor is a multidimensional array


2. Flow is used to define the flow of data in operation.

TensorFlow is used to define the flow of data in operation on a multidimensional


array or Tensor.
keras
Keras, even though it cannot work with low-level computation, is designed to work as a high-
level API wrapper, which then caters to the lower-level APIs out there. With the Keras high-
level API, we can create models, define layers, and set up multiple input-output models easily.

Since Keras has the amazing functionality to behave like a high-level wrapper, it can run on top
of Theano, CTNK, and TensorFlow seamlessly. This is very advantageous because it becomes
very convenient to train any kind of Deep Learning model without much effort.

Following are some of the noteworthy features of Keras:

 Keras gives users an easy-to-use framework, alongside faster prototyping methods and
tools.
 It works efficiently on both CPU and GPU, without any hiccups.
 Keras supports working with both Convolutional Neural Networks (CNNs)
and Recurrent Neural Networks (RNNs) for a variety of applications such as computer
vision and time series analysis, respectively.
 It has seamless functionality provisions to make use of both CNN and RNN if need be.
 It completely supports arbitrary network architectures, making model sharing and layer
sharing available to users to work with.
TensorBoard. And advantages of using tensor flow

TensorBoard is a Graphical User Interface (GUI) that is provided by TensorFlow to help users
visualize graphs, plots, and other metrics easily without having to write a lot of code.
TensorBoard provides an ample number of advantages in terms of readability, ease of use, and
performance metrics.

TensorFlow has numerous advantages, and this is why it is the most used framewor k for
Machine Learning in the world. Some of its advantages are given below:

 Platform independency
 Usage of GPU for distributed computing
 Auto-differentiation capability
 Open-source and large community
 Highly customizable based on requirements
 Support for asynchronous computations

working of an algorithm in TensorFlow

There are five main steps that govern the working of the majority of algorithms
in TensorFlow. They are as follows:

1. Data import or data generation, alongside setting up a data pipeline


2. Data input through computational graphs
3. Generation of the loss function to evaluate the output
4. Backpropagation to modify the data
5. Iterating until output criteria are met

Tensorflow architecture works in three parts:

 Preprocessing the data


 Build the model
 Train and estimate the model

It is called Tensorflow because it takes input as a multi-dimensional array, also


known as tensors. You can construct a sort of flowchart of operations (called a
Graph) that you want to perform on that input. The input goes in at one end, and
then it flows through this system of multiple operations and comes out the other
end as output.

This is why it is called TensorFlow because the tensor goes in it flows through a
list of operations, and then it comes out the other side.

Keras Workflow Model in detail

Installing Keras is very straightforward. A simple pip command will get you
started with it. Now, to quickly get an overview of what Keras can do, let’s begin
by understanding Keras via some code.

 Define the training data—the input tensor and the target tensor
 Build a model or a set of Keras layers, which leads to the target tensor
 Structure a learning process by adding metrics, choosing a loss function, and
defining the optimizer
 Use the fit() method to work through the training data and teach the model

The first concept in the Keras tutorial that you should look out for is how to build
models in Keras.
Hyperparameters

Hyperparameters are parameters whose values control the learning process and
determine the values of model parameters that a learning algorithm ends up
learning. The prefix 'hyper_' suggests that they are 'top-level' parameters that
control the learning process and the model parameters that result from it.

Hyperparameter tuning is a lengthy process of increasing the model accuracy


by tweaking the hyperparameters — values that can't be learned and need to be
specified before the training.

Hyperparameter plays an essential role in the fitting of supervised machine


learning algorithms. However, it is computationally expensive to tune all the
tunable hyperparameters simultaneously especially for large data sets

three hyperparameter tuning methods — grid search, random search, and Bayesian
optimization. If evaluating our model with training data will be quick, we can
choose the grid search method. Otherwise, we should select random search or
Bayesian optimization to save time and computing resources.

Tensor Rank and Tensor Math

The rank of a tensor tells us how many indexes are required to access (refer to) a
specific data element contained within the tensor data structure.

Tensors are multidimensional arrays that store a specific type of value. Objects:
this is the definition used in other fields. In mathematics and physics, tensors are
not just a data structure: they also have a list of properties, like a specific product.

In mathematics, a rectangular array of number is called metrics. In NumPy library,


these metrics called ndaaray. In PyTorch, it is known as Tensor. A tensor is an n-
dimensional data container. For example, In PyTorch, 1d-tensor is a vector, 2d-
tensor is a metrics, 3d- tensor is a cube, and 4d-tensor is a cube vector.

One of the major advantages of TensorFlow is that it supports GPUs, as well as


CPUs. It also has a faster compilation time than other deep learning libraries, like
Keras and Torch

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy