0% found this document useful (0 votes)
4 views

Introduction+to+TensorFlow

The document provides an overview of TensorFlow, a machine learning library by Google, highlighting its features, advantages, and the transition from TensorFlow 1.x to 2.x. It emphasizes TensorFlow's usability for deep learning applications, its integration with Keras, and the support for various programming languages and operating systems. Additionally, it outlines the new functionalities in TensorFlow 2.x and offers resources for tutorials and migration guides.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Introduction+to+TensorFlow

The document provides an overview of TensorFlow, a machine learning library by Google, highlighting its features, advantages, and the transition from TensorFlow 1.x to 2.x. It emphasizes TensorFlow's usability for deep learning applications, its integration with Keras, and the support for various programming languages and operating systems. Additionally, it outlines the new functionalities in TensorFlow 2.x and offers resources for tutorials and migration guides.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Tens orFlow

Introduction

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Agenda
- What is tensorflow?
- Why we are using tensorflow?
- TensorFlow 2.x
- TensorFlow 2.x - features and changes
- Changes with respect to TensorFlow 1.x
- Keras and it’s advantages
- Keras vs tf.keras
- Tutorials and guides
- Notes

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
TensorFlow
- TensorFlow is a machine learning library by Google
- It is open sourced
- It is mainly used for implementing neural networks
- It is an end-to-end platform, which means you can use it for building your
models from scratch to deploying them into a production environment

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Why TensorFlow for this course?
- Most used library for deep learning
- Easy transition from research to production
- Extensive industry support
- Easy deployment around servers, mobile devices, web platforms etc
- You can easily sort out the issues using GitHub, StackOverflow etc
- Used by world’s top AI companies
- Consistently updated with cutting edge changes

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Some technical reasons
- Easy and readable syntax
- Being a low-level library it provide more flexibility to developers to implement
their own functionalities and services
- Provides high level API for implementing advanced neural net architectures
- Distributed training

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
OS Support
TensorFlow is supported on following 64 -bit systems:

- Ubuntu 16.04 or later


- macOS 10.12.6 (Sierra) or later (no GPU support)
- Windows 7 or later
- Raspbian 9.0 or later

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Language support
- Python
- C++
- JavaScript
- Java
- Go
- Swift

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
New version - TensorFlow 2.x
- Much easier development
- Tight integration with Keras
- More familiar for Python developers
- Deploy anywhere across servers, mobile and edge devices, browser and
Node.js with TensorFlow Extended, TensorFlow Lite and TensorFlow .JS
- Multi GPU support

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
What’s new in TF2?
- tf.function(): Creates a callable TensorFlow graph from a Python function
- tf.GradientTape(): Records operations for automatic differentiation
- tf.data(): helps in building complex input pipelines from simple, and reusable
pieces

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Changes with respect to TensorFlow 1.x
- Cleaning up of APIs: many APIs are either gone or moved
- Eager execution (default): no need manually compile the abstract syntax tree
- No more globals: no need to track variables
- Introduction of function and elimination of session

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Model building: from simple to flexible
1. Sequential API + built in layers ----- > New users
2. Functional API + built in layers ----- > Engineers with standard use case
3. Functional API + custom layers ----- > Engineers requiring control
+ custom metrics
+ custom losses
4. Subclassing: write everything ----- > Researchers
yourself from
scratch

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Keras

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Keras
- Keras is a high-level neural network API
- Written and implemented in Python
- Can run on top of TensorFlow
- It was designed keeping fast experimentation in mind.

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Keras advantages
● User-friendly
○ Simple and user friendly interface. Actionable feedbacks are also provided.

● Modular and composable


○ Modules are there for every step, you can combine them to build solutions.

● Easy to extend
○ Gives freedom to add custom blocks to build on new ideas.
○ Cusrom layers, metrics, loss functions etc. can be defined easily.

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Keras vs tf.keras
- In TF2 instead of writing “import keras” you will write
“from tensorflow import keras”
- In colab, if you see the message “Using TensorFlow Backend”, you are not
using tensorflow 2.x implementation of keras
- tf.keras is the TensorFlow’s implementation of keras so it supports all the
latest changes in the TensorFlow version
- tf.keras is also better in support and maintenance

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Latest tutorials and guides
- https://www.tensorflow.org/tutorials
- https://www.tensorflow.org/guide

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Notes
- TensorFlow 2.0 announcement video:
https://www.youtube.com/watch?v=EqWsPO8DVX k
- Guide to convert your code from TF 1 to TF 2:
https://www.tensorflow.org/guide/migrate
- Detailed introduction video:
https://www.youtube.com/watch?v=5ECD8J3dvDQ

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Thank you!
Happy Learning :)

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.

You might also like