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

Unit1-Building Models With Tensorflow

TensorFlow is an end-to-end platform that makes it easy to build and deploy machine learning models. It offers multiple levels of abstraction for model building, from high-level APIs like Keras to lower-level flexibility. TensorFlow can deploy models to servers, edge devices, mobile devices, and web environments. It also supports powerful tools for experimentation and research, including state-of-the-art models, eager execution for debugging, and distributed training capabilities.

Uploaded by

Devyansh Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Unit1-Building Models With Tensorflow

TensorFlow is an end-to-end platform that makes it easy to build and deploy machine learning models. It offers multiple levels of abstraction for model building, from high-level APIs like Keras to lower-level flexibility. TensorFlow can deploy models to servers, edge devices, mobile devices, and web environments. It also supports powerful tools for experimentation and research, including state-of-the-art models, eager execution for debugging, and distributed training capabilities.

Uploaded by

Devyansh Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Unit1-Building Models With

TensorFlow
Why TesnorFlow ?
• Whether you’re an expert or a beginner, TensorFlow is an end-to-end
platform that makes it easy for you to build and deploy ML models.

https://www.youtube.com/watch?time_continue=109&v=NlpS-DhayQA&feature=emb_logo
Easy Model building
• TensorFlow offers multiple levels of abstraction so you can choose
the right one for your needs. Build and train models by using the
high-level Keras API, which makes getting started with TensorFlow
and machine learning easy.
• If you need more flexibility, eager execution allows for immediate
iteration and intuitive debugging. For large ML training tasks, use the
Distribution Strategy API for distributed training on different
hardware configurations without changing the model definition.

https://www.youtube.com/watch?time_continue=49&v=v-FgOACRgfs&feature=emb_logo
Robust ML production anywhere
• TensorFlow has always provided a direct path to production. Whether
it’s on servers, edge devices, or the web, TensorFlow lets you train
and deploy your model easily, no matter what language or platform
you use.
• Use TensorFlow Extended (TFX) if you need a full production ML
pipeline. For running inference on mobile and edge devices, use
TensorFlow Lite. Train and deploy models in JavaScript environments
using TensorFlow.js.

https://www.youtube.com/watch?time_continue=143&v=tPb2u9kwh2w&feature=emb_logo
Powerful experimentation for research
• Build and train state-of-the-art models without sacrificing speed or
performance. TensorFlow gives you the flexibility and control with
features like the Keras Functional API and Model Subclassing API for
creation of complex topologies. For easy prototyping and fast
debugging, use eager execution.
• TensorFlow also supports an ecosystem of powerful add-on libraries
and models to experiment with, including Ragged Tensors,
TensorFlow Probability, Tensor2Tensor and BERT.
https://www.youtube.com/watch?v=p45kQklIsd4&feature=emb_logo
tf.test.is_built_with_cuda
• Returns whether TensorFlow was built with CUDA (GPU) support.
import tensorflow as tf
Print(tf.__version__)
print(tf.test.is_built_with_cuda())
tf.test.is_built_with_gpu_support
• Returns whether TensorFlow was built with GPU (i.e. CUDA or ROCm)
support.
import tensorflow as tf
print(tf.test.is_built_with_gpu_support())
tf.test.gpu_device_name
• Returns the name of a GPU device if available or the empty string.
import tensorflow as tf
print(tf.test.gpu_device_name())

import tensorflow as tf
device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
  raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))
Number of GPU available

import tensorflow as tf
print("Num GPUs Available: ",
len(tf.config.experimental.list_physical_devices('GPU')))
tf.config.list_physical_devices

• Physical devices are hardware devices present on the host machine.


By default all discovered CPU and GPU devices are considered visible.

import tensorflow as tf
physical_devices=tf.config.list_physical_devices()
for row in physical_devices:
print(row)

You might also like