Eeb131 Intro To Ai and It-03
Eeb131 Intro To Ai and It-03
image
Factors to Consider
• High-Level APIs vs. Low-Level Control:
• Frameworks like Keras offer a high-level API that
simplifies model building with minimal code.
• PyTorch and TensorFlow provide more flexibility but
may require more effort to customize models.
• Syntax and Readability:
• PyTorch follows a Pythonic approach, making it easier
for developers already familiar with Python.
• TensorFlow 1.x was considered complex, but TensorFlow
2.x improved usability with eager execution and
integrated Keras.
Factors to Consider
High-Level API Example (Keras - TensorFlow)
image
TensorFlow
• Developed by Google Brain and released as an
open-source machine learning framework in 2015.
• Designed for scalability, enabling large-scale deep
learning training and deployment across CPUs,
GPUs, and TPUs.
• Primarily used for both research and enterprise
applications
• https://www.tensorflow.org/tutorials
Key Features of TF
• TensorBoard for Visualization
• Provides an interactive dashboard to monitor training progress, loss curves, and
model architectures.
• Supports real-time tracking of experiments.
Key Features of TF
• Keras API Integration (check previous ppt)
• TensorFlow includes Keras as a high-level API,
simplifying model creation and training.
• Allows quick prototyping with minimal code.
• TensorFlow Lite for Mobile and Edge Devices
• Optimized for mobile AI applications (Android, iOS,
Raspberry Pi).
• Supports model quantization to reduce computational
load.
Use Cases and Applications
• Image and Speech Recognition:
• Used in Google Photos for image tagging and object detection.
• Employed in speech-to-text applications (e.g., Google Assistant).
• Healthcare AI Applications:
• Used in medical imaging analysis (e.g., detecting cancer in CT
scans).
• Applied in drug discovery and patient diagnostics.
• Cloud-Based AI Solutions (GCP):
• TensorFlow is deeply integrated with Google Cloud AI services.
https://www.tensorflow.org/tfx/tutorials/transform/data_preprocessing_w
ith_cloud
• Supports auto-scaling and distributed training in cloud
environments.
Pytorch
• Developed by Facebook AI Research (FAIR) and
released as an open-source deep learning
framework in 2016.
• Designed for flexibility and research, making it the
preferred choice for academic studies.
• Uses dynamic computation graphs, allowing real-
time modifications during training.
• https://pytorch.org/tutorials/beginner/basics/intro
.html
Key Features of PyTorch
• TorchScript for Model Deployment
• Supports Pythonic debugging using standard
debugging tools.
• Easy Integration with Hugging Face and OpenAI
Tools
• Works seamlessly with Hugging Face Transformers for
NLP.
• Used in OpenAI’s GPT models and DALL·E.
Keras
• Originally developed as a standalone framework,
later integrated into TensorFlow.
• Serves as a high-level deep learning API, simplifying
model creation and training.
• Ideal for beginners, educators, and rapid
prototyping.
Key Features of Keras
• User-Friendly API for Quick Prototyping
• Models can be built in a few lines of code.
• Abstracts low-level implementation details.
• Pre-Built Models Available
• Offers ready-to-use pre-trained models via Keras
Applications.
• Supports transfer learning for quick model development.
• https://keras.io/
Keras
https://github.com/PacktPublishing/Deep-
Learning-with-TensorFlow-and-Keras-3rd-
edition
Keras
https://github.com/PacktPublishing/Deep-Learning-with-TensorFlow-and-Keras-
3rd-edition
4. Specialized Libraries for Deep Learning
Specialized libraries for Deep Learning – Useful for
first-time users:
• Hugging Face Transformers (NLP)
• OpenCV (Computer Vision)
• Fast.ai (Simplified Deep Learning)
• Albumentations (Data Augmentation)
• Matplotlib & TensorBoard (Model Visualization)
Hugging Face Transformers (NLP)
• Hugging Face is an open-source library that provides
tools and pre-trained models for NLP tasks.
• State-of-the-Art Models: Access to the latest
advancements in NLP (e.g., GPT, BERT, RoBERTa).
• Community and Resources: Hugging Face has a large
community, tutorials, and documentation to help
students get started.
• Support for multiple frameworks (PyTorch, TensorFlow,
JAX)
• https://huggingface.co/
Benefits of Hugging Face (for Students)
• Hands-On Learning: Students can experiment with
real-world NLP tasks.
• No Need for Expensive Hardware: Pre-trained
models can be fine-tuned on smaller datasets using
free resources like Google Colab.
• Community Support: Hugging Face has an active
community and forums where students can ask
questions and share projects.
• Open Source: All tools and models are free to use.
OpenCV (Computer Vision)
• Provides image processing functions for object
detection, face recognition, and video analysis.
• Compatible with deep learning models
(TensorFlow/PyTorch).
• https://docs.opencv.org/4.x/d9/df8/tutorial_root.h
tml
HW:
Find and Run any OpenCV code for a simple image
processing algorithm!
Fast.ai (Simplified Deep Learning)
• https://www.fast.ai/
• Built on PyTorch and simplifies deep learning model
training.
• Provides easy-to-use high-level APIs for fast
experimentation.
• It’s great for: Students who want quick model
training without deep technical details.
Useful Model Visualization Libraries