0PricingLogin
Learn AI with Python · Lesson

Using VGG16 and ResNet50 as Base Models

keras.applications.VGG16(weights='imagenet', include_top=False), adding custom head.

Keras Applications Module

tf.keras.applications ships dozens of pretrained architectures you can download with one line. Two classics are VGG16 (simple, deep stack of 3x3 convolutions) and ResNet50 (residual connections, deeper and more accurate).

Loading VGG16 as a Base

Load VGG16 with ImageNet weights but without its classifier head so you can attach your own.

from tensorflow.keras.applications import VGG16

base = VGG16(
    weights="imagenet",        # download pretrained weights
    include_top=False,         # drop the 1000-class classifier
    input_shape=(224, 224, 3)  # standard ImageNet input size
)

All lessons in this course

  1. Transfer Learning Concepts and Strategies
  2. Using VGG16 and ResNet50 as Base Models
  3. Fine-tuning: Unfreezing and Retraining
  4. MobileNet and EfficientNet for Edge Deployment
← Back to Learn AI with Python