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

Exp No 1

The document provides an introduction to TensorFlow and Theano, two frameworks used for developing machine learning models. It outlines the features, advantages, and disadvantages of both frameworks, highlighting TensorFlow's ease of use and Theano's execution speed. Additionally, it compares the two frameworks, noting that while TensorFlow is more user-friendly, Theano is faster for specific tasks and better suited for research purposes.

Uploaded by

shashanktipe99
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)
4 views6 pages

Exp No 1

The document provides an introduction to TensorFlow and Theano, two frameworks used for developing machine learning models. It outlines the features, advantages, and disadvantages of both frameworks, highlighting TensorFlow's ease of use and Theano's execution speed. Additionally, it compares the two frameworks, noting that while TensorFlow is more user-friendly, Theano is faster for specific tasks and better suited for research purposes.

Uploaded by

shashanktipe99
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

************************************************************************************************

EXPERIMENT NO. 1
Name :- Vinay Santosh Kadam.
Class : B.E. COMPUTER SUB : D.L
Roll No : 24
Date of conductance : / /2025 Date of submission : / /2025
************************************************************************************************
AIM: Introduction to Tensor flow and Theano.

Objective: To understand the basics of TensorFlow and Theano framework.

TensorFlow:
Features of TensorFlow
● TensorFlow is a Framework which is used to develop machine learning
models.
● TensorFlow is applicable for the large datasets.
TensorFlow is an end-to-end open-source platform for machine learning.
TensorFlow makes it easy for beginners and experts to create machine learning
models. See the sections below to get started. TensorFlow 2 focuses on simplicity
and ease of use, with updates like eager execution, intuitive higher-level APIs, and
flexible model building on any platform.Many guides are written as Jupyter
notebooks and run directly in Google Colab, a hosted notebook environment that
requires no setup.

Install TensorFlow 2
● TensorFlow is tested and supported on the following 64-bit systems:
● Python 3.8–3.11
● Ubuntu 16.04 or later
● Windows 7 or later (with C++ redistributable)
● macOS 10.12.6 (Sierra) or later (no GPU support)
● WSL2 via Windows 10 19044 or higher including GPUs (Experimental)

TensorFlow basics:
This guide provides a quick overview of TensorFlow basics. TensorFlow is an end-
to-end platform for machine learning. It supports the following:

● Multidimensional-array-based numeric computation (similar to NumPy.)


● GPU and distributed processing
● Automatic differentiation
● Model construction, training, and export
TensorFlow operates on multidimensional arrays or tensors represented as tf.Tensor
objects. Here is a two-dimensional tensor:

The most important attributes of a tf.Tensor are its shape and dtype:
• Tensor.shape: tells you the size of the tensor along each of its axes.
• Tensor.dtype: tells you the type of all the elements in the tensor.

TensorFlow implements standard mathematical operations on tensors, as well as


many operations specialized for machine learning.

Advantages and Disadvantages of TensorFlow:


Advantages:
● It works for algorithms like reinforcement learning and others.
● Provides graph computing abstraction.
● Parallelism of data and models is available.
● It can run on a variety of CPUs and GPUs.
Disadvantages:
● Since it doesn’t accept matrix operations, copying these huge matrices is a
time-consuming method.
● Compared to other frameworks, it runs slow.
● No pre-trained models are available.
● Drops out of the program to load each new training batch in Python.
● Not so adaptable.
● On massive development programs, dynamic typing is vulnerable to errors

Theano:
Theano is a Python library that allows us to evaluate mathematical operations
including multi-dimensional arrays so efficiently. It is mostly used in building Deep
Learning Projects. It works a way faster on the Graphics Processing Unit (GPU)
rather than on the CPU.Theano attains high speeds that give tough competition to C
implementations for problems involving large amounts of data. It can take advantage
of GPUs which makes it perform better than C on a CPU by considerable orders of
magnitude under certain circumstances.It knows how to take structures and convert
them into very efficient code that uses Numpyand some native libraries. It is mainly
designed to handle the types of computation required for large neural network
algorithms used in Deep Learning. That is why it is a very popular library in the field
of Deep Learning.

Why Theano Python Library


Theano is a sort of hybrid between numpy and sympy, an attempt is made to
combine the two into one powerful library. Some advantages of Theano are as
follows:
● Stability Optimization: Theano can find out some unstable expressions and
can use more stable means to evaluate them.
● Execution Speed Optimization: As mentioned earlier, Theano can make use
of recent
● GPUs and execute parts of expressions in your CPU or GPU, making it much
faster than Python.
● Symbolic Differentiation: Theano is smart enough to automatically create
symbolic graphs for computing gradients.
Advantages and Disadvantages of Theano
Advantages
● Keras, Lasagne, and Blocks-like packages are built on Theano.
● Raw Theano is a low-level product.
● Having high-level modules like Keras, Blocks, Lasagne, etc, makes it more
usable.
Disadvantages
● On AWS, it can be complex.
● It can be run on a single GPU.
● Requires large compile time for vast and complex models.
● Error notices are complex, which makes debugging harder.
Difference Between TensorFlow and Theano:
TensorFlow Theano

TensorFlow execution speed is slow Theano performs tasks way faster


when compared to Theano. But in than TensorFlow. Mainly the tasks
the case of handling the tasks which that require a single GPU will run
require multiple GPU TensorFlow is faster in Theano.
faster.

TensorFlow lacks native windows TensorFlow lacks native windows


support. It doesn’t support Lasagne. support. It doesn’t support Lasagne.

Tensorflow has lesser Tensorflow has lesser


documentation when in comparison documentation when in comparison
with Theano. with Theano.

TensorFlow runs specifically on


Linux, macOS, Windows, and Theano runs on cross-platform.
Android.

TensorFlow is one of the famous


Deep Learning libraries and is Theano is an old Framework that is
mostly used for research purposes. not used mostly.

TensorFlow does not have any pre-


trained inbuilt models Theano is compatible with a deep
learning library called Keras which
contains some pre-trained models.

Conclusion:
The interfaces in both frameworks are identical. TensorFlow, on the other hand, is a
lot easier to use because it comes with a lot of monitoring tools. In terms of
functionality and speed, Theano is better, but TensorFlow is best suited for
deployment.

You might also like