CHP 3
CHP 3
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 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
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.
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
There are five main steps that govern the working of the majority of algorithms
in TensorFlow. They are as follows:
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.
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.
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.
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.