Lesson 10.4: Introduction to TensorFlow/Keras
🔹 What is TensorFlow?
TensorFlow is an open-source deep learning library developed by Google.
-
Used for building and training neural networks.
-
Supports CPU, GPU, and TPU acceleration.
-
Can be used for research and production.
🔹 What is Keras?
Keras is a high-level API for TensorFlow.
-
Simplifies building deep learning models.
-
Provides an easy-to-use interface for layers, models, and training.
🔹 Key Features
-
Build Sequential and Functional models.
-
Predefined layers like Dense, Conv2D, LSTM.
-
Supports custom loss functions and optimizers.
-
Compatible with TensorFlow ecosystem (TensorBoard, TF Hub).
🔹 Example (Simple Neural Network in Keras)
-
Sequential→ Layer-by-layer model -
Dense→ Fully connected layer -
compile→ Define optimizer, loss, and metrics -
fit→ Train the model
🔹 Advantages
-
Easy model building and training.
-
Works for both beginners and advanced users.
-
Integrates well with TensorFlow tools.
🔹 Limitations
-
Less flexibility compared to pure TensorFlow for very complex architectures.
-
Requires understanding of tensors and layers for advanced models.
✅ Quick Recap:
-
TensorFlow → Core deep learning library.
-
Keras → High-level API to easily build and train neural networks.
-
Together → Simplifies deep learning development.
