ML 2
ML 2
ML 2
Assignment - 2
Submitted by,
Ashmi P
Roll no-03
ME-CSE
TensorFlow is an end-to-end open source platform for machine learning.
TensorFlow is a rich system for managing all aspects of a machine learning
system; however, this class focuses on using a particular TensorFlow API to
develop and train machine learning models. See the TensorFlow documentation for
complete details on the broader TensorFlow system.
TensorFlow APIs are arranged hierarchically, with the high-level APIs built on the
low-level APIs. Machine learning researchers use the low-level APIs to create and
explore new machine learning algorithms. In this class, you will use a high-level
API named tf.keras to define and train machine learning models and to make
predictions. tf.keras is the TensorFlow variant of the open-source Keras API.
TensorFlow is available for Python, C++, and Java, and can be used to train and
deploy machine learning models on a variety of platforms, including desktops,
laptops, servers, and mobile devices.
Here are some of the benefits of using TensorFlow for machine learning:
Flexibility:
TensorFlow's flexible architecture allows you to deploy computation to one or
more CPUs or GPUs in a distributed manner. This makes it a good choice for
training and deploying large-scale machine learning models.
Scalability:
TensorFlow is designed to scale to large datasets and models. It can be used to
train and deploy models on a variety of platforms, including desktops, laptops,
servers, and mobile devices.
Performance:
TensorFlow is optimized for performance, and can be used to train and deploy
machine learning models quickly and efficiently.
Open source:
TensorFlow is an open-source software library, which means that it is free to use
and modify. This makes it a good choice for researchers and engineers who want
to develop and deploy custom machine learning models.
Here, add is a node which represents addition operation. a and b are input tensors
and c is the resultant tensor. This flexible architecture allows you to deploy
computation to one or more CPUs or GPUs in a desktop, server, or mobile device
with a single API!
Computational Graph
Any TensorFlow Core program can be divided into two discrete sections:
● Building the computational graph. A computational graph is nothing but
a series of TensorFlow operations arranged into a graph of nodes.
● Running the computational graph. To actually evaluate the nodes, we
must run the computational graph within a session. A session
encapsulates the control and state of the TensorFlow runtime.
TensorFlow has Variable nodes too which can hold variable data. They are mainly
used to hold and update parameters of a training model. Variables are in-memory
buffers containing tensors. They must be explicitly initialized and can be saved to
disk during and after training. You can later restore saved values to exercise or
analyze the model. An important difference to note between a constant and
Variable is: