Keras comes with several pre-trained models, such as VGG16, ResNet50, Inception, and MobileNet. These models, trained on large datasets like ImageNet, can be used for transfer learning—where a pre-trained model is fine-tuned to perform a new task.
- Example: Using a pre-trained VGG16 model:pythonCopy code
from keras.applications import VGG16 base_model = VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3))
Transfer learning enables you to leverage these models without needing to train from scratch.
Leave a Reply