← TensorFlow & Keras learning pathTensorFlow & Keras · Module 6 of 10
CNNs for images in Keras
Build image classifiers with convolutional layers.
📖 Key ideas
- Stack Conv2D and MaxPooling2D, then Flatten/GlobalAveragePooling and Dense.
- Normalise pixels to 0–1.
- Data augmentation layers: RandomFlip, RandomRotation, RandomZoom.
- Transfer learning: keras.applications (MobileNetV2, EfficientNet, ResNet50).
- Freeze the base, train the new head, then fine-tune.
💡 Real-life example: Building a CNN in Keras is stacking filters like layers of sieves, each catching finer details.
Conv2D2D convolution layer
MaxPooling2DDownsampling layer
keras.applicationsPretrained models
GlobalAveragePooling2DAverages each feature map