Keras Keras Keras About API Guides Examples
CTRL K
    GitHub
    CTRL K
      • Keras
        • Keras 3.0
        • About Keras
        • Getting started
          • Introduction to Keras for engineers
          • Keras 3 benchmarks
          • The Keras ecosystem
          • FAQ
        • Developer guides
          • The Functional API
          • The Sequential model
          • Making new layers and models via subclassing
          • Training & evaluation with the built-in methods
          • Customizing fit() with Jax
          • Customizing fit() with TensorFlow
          • Customizing fit() with PyTorch
          • Writing a custom training loop in JAX
          • Writing a custom training loop in TensorFlow
          • Writing a custom training loop in PyTorch
          • Serialization & Saving
          • Customizing saving & serialization
          • Writing your own callbacks
          • Transfer learning & fine-tuning
          • Distributed training with Jax
          • Distributed training with TensorFlow
          • Distributed training with PyTorch
          • Distributed training with Keras 3
          • Migrating Keras 2 code to Keras 3
          • Hyperparameter Tuning
            • Getting started with KerasTuner
            • Distributed hyperparameter tuning with KerasTuner
            • Tune hyperparameters in your custom training loop
            • Visualize the hyperparameter tuning process
            • Handling failed trials in KerasTuner
            • Tailor the search space
          • KerasCV
            • Use KerasCV to assemble object detection pipelines
            • Use KerasCV to train powerful image classifiers.
            • CutMix, MixUp, and RandAugment image augmentation with KerasCV
            • High-performance image generation using Stable Diffusion in KerasCV
            • Custom Image Augmentations with BaseImageAugmentationLayer
            • Semantic Segmentation with KerasCV
            • Segment Anything in KerasCV
          • KerasNLP
            • Getting Started with KerasNLP
            • Pretraining a Transformer from scratch with KerasNLP
            • Uploading Models with KerasNLP
          • KerasHub
            • Getting Started with KerasHub
            • Semantic Segmentation with KerasHub
            • Pretraining a Transformer from scratch with KerasHub
            • Uploading Models with KerasHub
            • Classification with KerasHub
            • Segment Anything in KerasHub
            • Stable Diffusion 3 in KerasHub
        • Keras 3 API documentation
          • Models API
            • The Model class
            • The Sequential class
            • Model training APIs
            • Saving & serialization
              • Whole model saving & loading
              • Weights-only saving & loading
              • Model config serialization
              • Model export for inference
              • Serialization utilities
              • Keras weights file editor
          • Layers API
            • The base Layer class
            • Layer activations
            • Layer weight initializers
            • Layer weight regularizers
            • Layer weight constraints
            • Core layers
              • Input object
              • InputSpec object
              • Dense layer
              • EinsumDense layer
              • Activation layer
              • Embedding layer
              • Masking layer
              • Lambda layer
              • Identity layer
            • Convolution layers
              • Conv1D layer
              • Conv2D layer
              • Conv3D layer
              • SeparableConv1D layer
              • SeparableConv2D layer
              • DepthwiseConv1D layer
              • DepthwiseConv2D layer
              • Conv1DTranspose layer
              • Conv2DTranspose layer
              • Conv3DTranspose layer
            • Pooling layers
              • MaxPooling1D layer
              • MaxPooling2D layer
              • MaxPooling3D layer
              • AveragePooling1D layer
              • AveragePooling2D layer
              • AveragePooling3D layer
              • GlobalMaxPooling1D layer
              • GlobalMaxPooling2D layer
              • GlobalMaxPooling3D layer
              • GlobalAveragePooling1D layer
              • GlobalAveragePooling2D layer
              • GlobalAveragePooling3D layer
            • Recurrent layers
              • LSTM layer
              • LSTM cell layer
              • GRU layer
              • GRU Cell layer
              • SimpleRNN layer
              • TimeDistributed layer
              • Bidirectional layer
              • ConvLSTM1D layer
              • ConvLSTM2D layer
              • ConvLSTM3D layer
              • Base RNN layer
              • Simple RNN cell layer
              • Stacked RNN cell layer
            • Preprocessing layers
              • Text preprocessing
                • TextVectorization layers
              • Numerical features preprocessing layers
                • Normalization layer
                • Spectral Normalization layer
                • Discretization layer
              • Categorical features preprocessing layers
                • CategoryEncoding layer
                • Hashing layer
                • HashedCrossing layer
                • StringLookup layer
                • IntegerLookup layer
              • Image preprocessing layers
                • Resizing layer
                • Rescaling layer
                • CenterCrop layer
                • AutoContrast layer
              • Image augmentation layers
                • RandomCrop layer
                • RandomFlip layer
                • RandomTranslation layer
                • RandomRotation layer
                • RandomZoom layer
                • RandomContrast layer
                • RandomBrightness layer
                • Solarization layer
                • Pipeline layer
              • Audio preprocessing layers
                • MelSpectrogram layer
            • Normalization layers
              • BatchNormalization layer
              • LayerNormalization layer
              • UnitNormalization layer
              • GroupNormalization layer
            • Regularization layers
              • Dropout layer
              • SpatialDropout1D layer
              • SpatialDropout2D layer
              • SpatialDropout3D layer
              • GaussianDropout layer
              • AlphaDropout layer
              • GaussianNoise layer
              • ActivityRegularization layer
            • Attention layers
              • GroupQueryAttention
              • MultiHeadAttention layer
              • Attention layer
              • AdditiveAttention layer
            • Reshaping layers
              • Reshape layer
              • Flatten layer
              • RepeatVector layer
              • Permute layer
              • Cropping1D layer
              • Cropping2D layer
              • Cropping3D layer
              • UpSampling1D layer
              • UpSampling2D layer
              • UpSampling3D layer
              • ZeroPadding1D layer
              • ZeroPadding2D layer
              • ZeroPadding3D layer
            • Merging layers
              • Concatenate layer
              • Average layer
              • Maximum layer
              • Minimum layer
              • Add layer
              • Subtract layer
              • Multiply layer
              • Dot layer
            • Activation layers
              • ReLU layer
              • Softmax layer
              • LeakyReLU layer
              • PReLU layer
              • ELU layer
            • Backend-specific layers
              • TorchModuleWrapper layer
              • Tensorflow SavedModel layer
              • JaxLayer
              • FlaxLayer
          • Callbacks API
            • Base Callback class
            • ModelCheckpoint
            • BackupAndRestore
            • TensorBoard
            • EarlyStopping
            • LearningRateScheduler
            • ReduceLROnPlateau
            • RemoteMonitor
            • LambdaCallback
            • TerminateOnNaN
            • CSVLogger
            • ProgbarLogger
            • SwapEMAWeights
          • Ops API
            • NumPy ops
            • NN ops
            • Linear algebra ops
            • Core ops
            • Image ops
            • FFT ops
          • Optimizers
            • SGD
            • RMSprop
            • Adam
            • AdamW
            • Adadelta
            • Adagrad
            • Adamax
            • Adafactor
            • Nadam
            • Ftrl
            • Lion
            • Lamb
            • Loss Scale Optimizer
            • Learning rate schedules API
              • LearningRateSchedule
              • ExponentialDecay
              • PiecewiseConstantDecay
              • PolynomialDecay
              • InverseTimeDecay
              • CosineDecay
              • CosineDecayRestarts
          • Metrics
            • Base Metric class
            • Accuracy metrics
            • Probabilistic metrics
            • Regression metrics
            • Classification metrics based on True/False positives & negatives
            • Image segmentation metrics
            • Hinge metrics for "maximum-margin" classification
            • Metric wrappers and reduction metrics
          • Losses
            • Probabilistic losses
            • Regression losses
            • Hinge losses for "maximum-margin" classification
          • Data loading
            • Image data loading
            • Timeseries data loading
            • Text data loading
            • Audio data loading
          • Built-in small datasets
            • MNIST digits classification dataset
            • CIFAR10 small images classification dataset
            • CIFAR100 small images classification dataset
            • IMDB movie review sentiment classification dataset
            • Reuters newswire classification dataset
            • Fashion MNIST dataset, an alternative to MNIST
            • California Housing price regression dataset
          • Keras Applications
            • Xception
            • EfficientNet B0 to B7
            • EfficientNetV2 B0 to B3 and S, M, L
            • ConvNeXt Tiny, Small, Base, Large, XLarge
            • VGG16 and VGG19
            • ResNet and ResNetV2
            • MobileNet, MobileNetV2, and MobileNetV3
            • DenseNet
            • NasNetLarge and NasNetMobile
            • InceptionV3
            • InceptionResNetV2
          • Mixed precision
            • Mixed precision policy API
          • Multi-device distribution
            • LayoutMap API
            • DataParallel API
            • ModelParallel API
            • Distribution utilities
          • RNG API
            • SeedGenerator class
            • Random operations
          • Utilities
            • Experiment management utilities
            • Model plotting utilities
            • Structured data preprocessing utilities
            • Tensor utilities
            • Python & NumPy utilities
            • Keras configuration utilities
          • KerasTuner
            • HyperParameters
            • Tuners
              • The base Tuner class
              • Objective class
              • RandomSearch Tuner
              • GridSearch Tuner
              • BayesianOptimization Tuner
              • Hyperband Tuner
              • Sklearn Tuner
            • Oracles
              • The base Oracle class
              • @synchronized decorator
              • RandomSearch Oracle
              • GridSearch Oracle
              • BayesianOptimization Oracle
              • Hyperband Oracle
            • HyperModels
              • The base HyperModel class
              • HyperEfficientNet
              • HyperImageAugment
              • HyperResNet
              • HyperXception
            • Errors
          • KerasCV
            • Layers
              • Augmentation layers
                • AutoContrast layer
                • AugMix layer
                • ChannelShuffle layer
                • CutMix layer
                • FourierMix layer
                • GridMask layer
                • JitteredResize layer
                • MixUp layer
                • RandAugment layer
                • RandomAugmentationPipeline layer
                • RandomChannelShift layer
                • RandomColorDegeneration layer
                • RandomCutout layer
                • RandomHue layer
                • RandomSaturation layer
                • RandomSharpness layer
                • RandomShear layer
                • Solarization layer
              • Preprocessing
                • Resizing layer
                • Grayscale layer
                • Equalization layer
                • Posterization layer
              • Regularization
                • DropBlock2D layer
                • DropPath layer
                • SqueezeAndExcite2D layer
                • StochasticDepth layer
            • Models
              • Tasks
                • BASNet Segmentation
                • DeepLabV3Plus Segmentation
                • SegFormer Segmentation
                • Segment Anything
                • CLIP Feature extractor
                • The ImageClassifier model
                • The RetinaNet model
                • StableDiffusion image-generation model
                • The YOLOV8Detector model
              • Backbones
                • CSPDarkNet backbones
                • DenseNet backbones
                • EfficientNetV1 models
                • EfficientNetV2 models
                • EfficientNet Lite backbones
                • MixTransformer backbones
                • MobileNetV3 backbones
                • ResNetV1 backbones
                • ResNetV2 backbones
                • VGG16 backbones
                • ViTDet backbones
                • YOLOV8 backbones
            • Bounding box formats and utilities
              • Bounding box formats
              • Bounding box utilities
                • Convert bounding box formats
                • Compute intersection over union of bounding boxes
                • Clip bounding boxes to be within the bounds of provided images
                • Convert a bounding box dictionary to -1 padded Dense tensors
                • Convert a bounding box dictionary batched Ragged tensors
                • Ensure that your bounding boxes comply with the bounding box spec
            • Losses
              • Binary Penalty Reduced Focal CrossEntropy
              • CIoU Loss
              • Focal Loss
              • GIoU Loss
              • IoU Loss
              • SimCLR Loss
              • SmoothL1Loss Loss
          • KerasNLP
            • Pretrained Models
              • Albert
                • AlbertTokenizer
                • AlbertBackbone model
                • AlbertTextClassifier model
                • AlbertTextClassifierPreprocessor layer
                • AlbertMaskedLM model
                • AlbertMaskedLMPreprocessor layer
              • Bart
                • BertTokenizer
                • BertBackbone model
                • BartSeq2SeqLM model
                • BartSeq2SeqLMPreprocessor layer
              • Bert
                • BertTokenizer
                • BertBackbone model
                • BertTextClassifier model
                • BertTextClassifierPreprocessor layer
                • BertMaskedLM model
                • BertMaskedLMPreprocessor layer
              • Bloom
                • BloomTokenizer
                • BloomBackbone model
                • BloomCausalLM model
                • BloomCausalLMPreprocessor layer
              • DebertaV3
                • DebertaV3Tokenizer
                • DebertaV3Backbone model
                • DebertaV3TextClassifier model
                • DebertaV3TextClassifierPreprocessor layer
                • DebertaV3MaskedLM model
                • DebertaV3MaskedLMPreprocessor layer
              • DistilBERT
                • DistilBertTokenizer
                • DistilBertBackbone model
                • DistilBertTextClassifier model
                • DistilBertTextClassifierPreprocessor layer
                • DistilBertMaskedLM model
                • DistilBertMaskedLMPreprocessor layer
              • Gemma
                • GemmaTokenizer
                • GemmaBackbone model
                • GemmaCausalLM model
                • GemmaCausalLMPreprocessor layer
              • Electra
                • ElectraTokenizer
                • ElectraBackbone model
              • Falcon
                • FalconTokenizer
                • FalconBackbone model
                • FalconCausalLM model
                • FalconCausalLMPreprocessor layer
              • FNet
                • FNetTokenizer
                • FNetBackbone model
                • FNetTextClassifier model
                • FNetTextClassifierPreprocessor layer
                • FNetMaskedLM model
                • FNetMaskedLMPreprocessor layer
              • GPT2
                • GPT2Tokenizer
                • GPT2Backbone model
                • GPT2CausalLM model
                • GPT2CausalLMPreprocessor layer
              • Llama
                • LlamaTokenizer
                • LlamaBackbone model
                • LlamaCausalLM model
                • LlamaCausalLMPreprocessor layer
              • Llama3
                • Llama3Tokenizer
                • Llama3Backbone model
                • Llama3CausalLM model
                • Llama3CausalLMPreprocessor layer
              • Mistral
                • MistralTokenizer
                • MistralBackbone model
                • MistralCausalLM model
                • MistralCausalLMPreprocessor layer
              • OPT
                • OPTTokenizer
                • OPTBackbone model
                • OPTCausalLM model
                • OPTCausalLMPreprocessor layer
              • PaliGemma
                • PaliGemmaTokenizer
                • PaliGemmaBackbone model
                • PaliGemmaCausalLM model
                • PaliGemmaCausalLMPreprocessor layer
              • Phi3
                • Phi3Tokenizer
                • Phi3Backbone model
                • Phi3CausalLM model
                • Phi3CausalLMPreprocessor layer
              • RoBERTa
                • RobertaTokenizer
                • RobertaBackbone model
                • RobertaTextClassifier model
                • RobertaTextClassifierPreprocessor layer
                • RobertaMaskedLM model
                • RobertaMaskedLMPreprocessor layer
              • XLM-RoBERTa
                • XLMRobertaTokenizer
                • XLMRobertaBackbone model
                • XLMRobertaTextClassifier model
                • XLMRobertaTextClassifierPreprocessor layer
                • XLMRobertaMaskedLM model
                • XLMRobertaMaskedLMPreprocessor layer
            • Models API
              • Backbone
              • Task
              • Preprocessor
              • CausalLM
              • CausalLMPreprocessor
              • Seq2SeqLM
              • Seq2SeqLMPreprocessor
              • TextClassifier
              • TextClassifierPreprocessor
              • MaskedLM
              • MaskedLMPreprocessor
              • upload_preset
            • Tokenizers
              • Tokenizer
              • WordPieceTokenizer
              • SentencePieceTokenizer
              • BytePairTokenizer
              • ByteTokenizer
              • UnicodeCodepointTokenizer
              • compute_word_piece_vocabulary function
              • compute_sentence_piece_proto function
            • Preprocessing Layers
              • StartEndPacker layer
              • MultiSegmentPacker layer
              • RandomSwap layer
              • RandomDeletion layer
              • MaskedLMMaskGenerator layer
            • Modeling Layers
              • TransformerEncoder layer
              • TransformerDecoder layer
              • FNetEncoder layer
              • PositionEmbedding layer
              • RotaryEmbedding layer
              • SinePositionEncoding layer
              • ReversibleEmbedding layer
              • TokenAndPositionEmbedding layer
              • AlibiBias layer
              • MaskedLMHead layer
              • CachedMultiHeadAttention layer
            • Samplers
              • Sampler base class
              • BeamSampler
              • ContrastiveSampler
              • GreedySampler
              • RandomSampler
              • TopKSampler
              • TopPSampler
            • Metrics
              • Perplexity metric
          • KerasHub
            • Pretrained Models
              • Albert
                • AlbertTokenizer
                • AlbertBackbone model
                • AlbertTextClassifier model
                • AlbertTextClassifierPreprocessor layer
                • AlbertMaskedLM model
                • AlbertMaskedLMPreprocessor layer
              • Bart
                • BertTokenizer
                • BertBackbone model
                • BartSeq2SeqLM model
                • BartSeq2SeqLMPreprocessor layer
              • Bert
                • BertTokenizer
                • BertBackbone model
                • BertTextClassifier model
                • BertTextClassifierPreprocessor layer
                • BertMaskedLM model
                • BertMaskedLMPreprocessor layer
              • Bloom
                • BloomTokenizer
                • BloomBackbone model
                • BloomCausalLM model
                • BloomCausalLMPreprocessor layer
              • DebertaV3
                • DebertaV3Tokenizer
                • DebertaV3Backbone model
                • DebertaV3TextClassifier model
                • DebertaV3TextClassifierPreprocessor layer
                • DebertaV3MaskedLM model
                • DebertaV3MaskedLMPreprocessor layer
              • DeepLabV3 and DeepLabV3Plus
                • DeepLabV3ImageConverter
                • DeepLabV3Backbone model
                • DeepLabV3ImageSegmenter model
                • DeepLabV3ImageSegmenterPreprocessor layer
              • DenseNet
                • DenseNetImageConverter
                • DensNetBackbone model
                • DenseNetImageClassifier model
                • DenseNetImageClassifierPreprocessor layer
              • DistilBERT
                • DistilBertTokenizer
                • DistilBertBackbone model
                • DistilBertTextClassifier model
                • DistilBertTextClassifierPreprocessor layer
                • DistilBertMaskedLM model
                • DistilBertMaskedLMPreprocessor layer
              • Electra
                • ElectraTokenizer
                • ElectraBackbone model
              • Falcon
                • FalconTokenizer
                • FalconBackbone model
                • FalconCausalLM model
                • FalconCausalLMPreprocessor layer
              • FNet
                • FNetTokenizer
                • FNetBackbone model
                • FNetTextClassifier model
                • FNetTextClassifierPreprocessor layer
                • FNetMaskedLM model
                • FNetMaskedLMPreprocessor layer
              • Gemma
                • GemmaTokenizer
                • GemmaBackbone model
                • GemmaCausalLM model
                • GemmaCausalLMPreprocessor layer
              • GPT2
                • GPT2Tokenizer
                • GPT2Backbone model
                • GPT2CausalLM model
                • GPT2CausalLMPreprocessor layer
              • Llama
                • LlamaTokenizer
                • LlamaBackbone model
                • LlamaCausalLM model
                • LlamaCausalLMPreprocessor layer
              • Llama3
                • Llama3Tokenizer
                • Llama3Backbone model
                • Llama3CausalLM model
                • Llama3CausalLMPreprocessor layer
              • Mistral
                • MistralTokenizer
                • MistralBackbone model
                • MistralCausalLM model
                • MistralCausalLMPreprocessor layer
              • MiT
                • MiTImageConverter
                • MiTBackbone model
                • MiTImageClassifier model
                • MiTImageClassifierPreprocessor layer
              • OPT
                • OPTTokenizer
                • OPTBackbone model
                • OPTCausalLM model
                • OPTCausalLMPreprocessor layer
              • PaliGemma
                • PaliGemmaTokenizer
                • PaliGemmaBackbone model
                • PaliGemmaCausalLM model
                • PaliGemmaCausalLMPreprocessor layer
              • Phi3
                • Phi3Tokenizer
                • Phi3Backbone model
                • Phi3CausalLM model
                • Phi3CausalLMPreprocessor layer
              • ResNet
                • ResNetImageConverter
                • ResNetBackbone model
                • ResNetImageClassifier model
                • ResNetImageClassifierPreprocessor layer
              • RoBERTa
                • RobertaTokenizer
                • RobertaBackbone model
                • RobertaTextClassifier model
                • RobertaTextClassifierPreprocessor layer
                • RobertaMaskedLM model
                • RobertaMaskedLMPreprocessor layer
              • Segment Anything Model
                • SAMImageConverter
                • SAMBackbone model
                • SAMImageSegmenter model
                • SAMImageSegmenterPreprocessor layer
                • SAMPromptEncoder layer
                • SAMMaskDecoder layer
              • Stable Diffusion 3
                • SAMImageConverter
                • StableDiffusion3Backbone model
                • StableDiffusion3TextToImage model
                • StableDiffusion3TextToImagePreprocessor layer
                • StableDiffusion3ImageToImage model
                • StableDiffusion3Inpaint model
              • T5
                • T5Tokenizer
                • T5Backbone model
                • T5Preprocessor layer
              • VGG
                • VGGImageConverter
                • VGGBackbone model
                • VGGImageClassifier model
                • VGGImageClassifierPreprocessor layer
              • ViTDet
                • VitDet model
              • Whisper
                • WhisperTokenizer
                • WhisperAudioConverter
                • WhisperBackbone model
              • XLM-RoBERTa
                • XLMRobertaTokenizer
                • XLMRobertaBackbone model
                • XLMRobertaTextClassifier model
                • XLMRobertaTextClassifierPreprocessor layer
                • XLMRobertaMaskedLM model
                • XLMRobertaMaskedLMPreprocessor layer
            • Models API
              • Backbone
              • CausalLM
              • CausalLMPreprocessor
              • ImageClassifier
              • ImageClassifierPreprocessor
              • ImageToImage
              • ImageSegmenter
              • Inpaint
              • MaskedLM
              • MaskedLMPreprocessor
              • Preprocessor
              • Seq2SeqLM
              • Seq2SeqLMPreprocessor
              • Task
              • TextClassifier
              • TextClassifierPreprocessor
              • TextToImage
              • upload_preset
            • Tokenizers
              • Tokenizers
              • WordPieceTokenizer
              • SentencePieceTokenizer
              • BytePairTokenizer
              • ByteTokenizer
              • UnicodeCodepointTokenizer
              • compute_word_piece_vocabulary function
              • compute_sentence_piece_proto function
            • Preprocessing Layers
              • AudioConverter layer
              • ImageConverter layer
              • StartEndPacker layer
              • MultiSegmentPacker layer
              • RandomSwap layer
              • RandomDeletion layer
              • MaskedLMMaskGenerator layer
            • Modeling Layers
              • TransformerEncoder layer
              • TransformerDecoder layer
              • FNetEncoder layer
              • PositionEmbedding layer
              • RotaryEmbedding layer
              • SinePositionEncoding layer
              • ReversibleEmbedding layer
              • TokenAndPositionEmbedding layer
              • AlibiBias layer
              • MaskedLMHead layer
              • CachedMultiHeadAttention layer
            • Samplers
              • Sampler base class
              • BeamSampler
              • ContrastiveSampler
              • GreedySampler
              • RandomSampler
              • TopKSampler
              • TopPSampler
            • Metrics
              • Perplexity metric
        • Code examples
          • Computer Vision
            • Image classification from scratch
            • Simple MNIST convnet
            • Image classification via fine-tuning with EfficientNet
            • Image classification with Vision Transformer
            • Classification using Attention-based Deep Multiple Instance Learning
            • Image classification with modern MLP models
            • A mobile-friendly Transformer-based model for image classification
            • Pneumonia Classification on TPU
            • Compact Convolutional Transformers
            • Image classification with ConvMixer
            • Image classification with EANet (External Attention Transformer)
            • Involutional neural networks
            • Image classification with Perceiver
            • Few-Shot learning with Reptile
            • Semi-supervised image classification using contrastive pretraining with SimCLR
            • Image classification with Swin Transformers
            • Train a Vision Transformer on small datasets
            • A Vision Transformer without Attention
            • Image Classification using Global Context Vision Transformer
            • Image segmentation with a U-Net-like architecture
            • Multiclass semantic segmentation using DeepLabV3+
            • Highly accurate boundaries segmentation using BASNet
            • Image Segmentation using Composable Fully-Convolutional Networks
            • Object Detection with RetinaNet
            • Keypoint Detection with Transfer Learning
            • Object detection with Vision Transformers
            • 3D image classification from CT scans
            • Monocular depth estimation
            • 3D volumetric rendering with NeRF
            • Point cloud segmentation with PointNet
            • Point cloud classification with PointNet
            • OCR model for reading Captchas
            • Handwriting recognition
            • Convolutional autoencoder for image denoising
            • Low-light image enhancement using MIRNet
            • Image Super-Resolution using an Efficient Sub-Pixel CNN
            • Enhanced Deep Residual Networks for single-image super-resolution
            • Zero-DCE for low-light image enhancement
            • CutMix data augmentation for image classification
            • MixUp augmentation for image classification
            • RandAugment for Image Classification for Improved Robustness
            • Image Captioning
            • Natural language image search with a Dual Encoder
            • Visualizing what convnets learn
            • Model interpretability with Integrated Gradients
            • Investigating Vision Transformer representations
            • Grad-CAM class activation visualization
            • Near-duplicate image search
            • Semantic Image Clustering
            • Image similarity estimation using a Siamese Network with a contrastive loss
            • Image similarity estimation using a Siamese Network with a triplet loss
            • Metric learning for image similarity search
            • Metric learning for image similarity search using TensorFlow Similarity
            • Self-supervised contrastive learning with NNCLR
            • Video Classification with a CNN-RNN Architecture
            • Next-Frame Video Prediction with Convolutional LSTMs
            • Video Classification with Transformers
            • Video Vision Transformer
            • Image Classification using BigTransfer (BiT)
            • Gradient Centralization for Better Training Performance
            • Learning to tokenize in Vision Transformers
            • Knowledge Distillation
            • FixRes: Fixing train-test resolution discrepancy
            • Class Attention Image Transformers with LayerScale
            • Augmenting convnets with aggregated attention
            • Learning to Resize in Computer Vision
            • Semi-supervision and domain adaptation with AdaMatch
            • Barlow Twins for Contrastive SSL
            • Consistency training with supervision
            • Distilling Vision Transformers
            • Focal Modulation: A replacement for Self-Attention
            • Using the Forward-Forward Algorithm for Image Classification
            • Masked image modeling with Autoencoders
            • Segment Anything Model with 🤗Transformers
            • Semantic segmentation with SegFormer and Hugging Face Transformers
            • Self-supervised contrastive learning with SimSiam
            • Supervised Contrastive Learning
            • When Recurrence meets Transformers
            • Efficient Object Detection with YOLOV8 and KerasCV
          • Natural Language Processing
            • Text classification from scratch
            • Review Classification using Active Learning
            • Text Classification using FNet (KerasHub)
            • Text Classification using FNet (KerasNLP)
            • Large-scale multi-label text classification
            • Text classification with Transformer
            • Text classification with Switch Transformer
            • Text classification using Decision Forests and pretrained embeddings
            • Using pre-trained word embeddings
            • Bidirectional LSTM on IMDB
            • Data Parallel Training with KerasHub and tf.distribute
            • Data Parallel Training with KerasNLP and tf.distribute
            • English-to-Spanish translation with KerasHub
            • English-to-Spanish translation with KerasNLP
            • English-to-Spanish translation with a sequence-to-sequence Transformer
            • Character-level recurrent sequence-to-sequence model
            • Multimodal entailment
            • Named Entity Recognition using Transformers
            • Text Extraction with BERT
            • Sequence to sequence learning for performing number addition
            • Semantic Similarity with KerasHub
            • Semantic Similarity with KerasNLP
            • Semantic Similarity with BERT
            • Sentence embeddings using Siamese RoBERTa-networks
            • End-to-end Masked Language Modeling with BERT
            • Abstractive Text Summarization with BART
            • Pretraining BERT with Hugging Face Transformers
            • Parameter-efficient fine-tuning of GPT-2 with LoRA
            • Training a language model from scratch with 🤗 Transformers and TPUs
            • MultipleChoice Task with Transfer Learning
            • Question Answering with Hugging Face Transformers
            • Abstractive Summarization with Hugging Face Transformers
          • Structured Data
            • Structured data classification with FeatureSpace
            • FeatureSpace advanced use cases
            • Imbalanced classification: credit card fraud detection
            • Structured data classification from scratch
            • Structured data learning with Wide, Deep, and Cross networks
            • Classification with Gated Residual and Variable Selection Networks
            • Classification with TensorFlow Decision Forests
            • Classification with Neural Decision Forests
            • Structured data learning with TabTransformer
            • Collaborative Filtering for Movie Recommendations
            • A Transformer-based recommendation system
          • Timeseries
            • Timeseries classification from scratch
            • Timeseries classification with a Transformer model
            • Electroencephalogram Signal Classification for action identification
            • Event classification for payment card fraud detection
            • Timeseries anomaly detection using an Autoencoder
            • Traffic forecasting using graph neural networks and LSTM
            • Timeseries forecasting for weather prediction
          • Generative Deep Learning
            • Denoising Diffusion Implicit Models
            • A walk through latent space with Stable Diffusion
            • DreamBooth
            • Denoising Diffusion Probabilistic Model
            • Teach StableDiffusion new concepts via Textual Inversion
            • Fine-tuning Stable Diffusion
            • Variational AutoEncoder
            • DCGAN to generate face images
            • WGAN-GP overriding `Model.train_step`
            • Conditional GAN
            • CycleGAN
            • Data-efficient GANs with Adaptive Discriminator Augmentation
            • Deep Dream
            • GauGAN for conditional image generation
            • PixelCNN
            • Face image generation with StyleGAN
            • Vector-Quantized Variational Autoencoders
            • Neural style transfer
            • Neural Style Transfer with AdaIN
            • GPT2 Text Generation with KerasHub
            • GPT2 Text Generation with KerasNLP
            • GPT text generation from scratch with KerasHub
            • Text generation with a miniature GPT
            • Character-level text generation with LSTM
            • Text Generation using FNet
            • Drug Molecule Generation with VAE
            • WGAN-GP with R-GCN for the generation of small molecular graphs
            • A walk through latent space with Stable Diffusion 3
            • Density estimation using Real NVP
          • Audio Data
            • Automatic Speech Recognition with Transformer
            • Automatic Speech Recognition using CTC
            • MelGAN-based spectrogram inversion using feature matching
            • Speaker Recognition
            • Audio Classification with the STFTSpectrogram layer
            • English speaker accent recognition using Transfer Learning
            • Audio Classification with Hugging Face Transformers
          • Reinforcement Learning
            • Actor Critic Method
            • Proximal Policy Optimization
            • Deep Q-Learning for Atari Breakout
            • Deep Deterministic Policy Gradient (DDPG)
          • Graph Data
            • Graph attention network (GAT) for node classification
            • Node Classification with Graph Neural Networks
            • Message-passing neural network (MPNN) for molecular property prediction
            • Graph representation learning with node2vec
          • Quick Keras Recipes
            • Parameter-efficient fine-tuning of Gemma with LoRA and QLoRA
            • Float8 training and inference with a simple Transformer model
            • Serving TensorFlow models with TFServing
            • Keras debugging tips
            • Customizing the convolution operation of a Conv2D layer
            • Trainer pattern
            • Endpoint layer pattern
            • Reproducibility in Keras Models
            • Writing Keras Models With TensorFlow NumPy
            • Simple custom layer example: Antirectifier
            • Estimating required sample size for model training
            • Memory-efficient embeddings for recommendation systems
            • Creating TFRecords
            • Packaging Keras models for wide distribution using Functional Subclassing
            • Approximating non-Function Mappings with Mixture Density Networks
            • Probabilistic Bayesian Neural Networks
            • Knowledge distillation recipes
            • Evaluating and exporting scikit-learn metrics in a Keras callback
            • How to train a Keras model on TFRecord files
        • KerasTuner
        • KerasHub
        • KerasCV
        • KerasNLP
      • Keras 3.0
      • About Keras
      • Getting started
        • Introduction to Keras for engineers
        • Keras 3 benchmarks
        • The Keras ecosystem
        • FAQ
      • Developer guides
        • The Functional API
        • The Sequential model
        • Making new layers and models via subclassing
        • Training & evaluation with the built-in methods
        • Customizing fit() with Jax
        • Customizing fit() with TensorFlow
        • Customizing fit() with PyTorch
        • Writing a custom training loop in JAX
        • Writing a custom training loop in TensorFlow
        • Writing a custom training loop in PyTorch
        • Serialization & Saving
        • Customizing saving & serialization
        • Writing your own callbacks
        • Transfer learning & fine-tuning
        • Distributed training with Jax
        • Distributed training with TensorFlow
        • Distributed training with PyTorch
        • Distributed training with Keras 3
        • Migrating Keras 2 code to Keras 3
        • Hyperparameter Tuning
          • Getting started with KerasTuner
          • Distributed hyperparameter tuning with KerasTuner
          • Tune hyperparameters in your custom training loop
          • Visualize the hyperparameter tuning process
          • Handling failed trials in KerasTuner
          • Tailor the search space
        • KerasCV
          • Use KerasCV to assemble object detection pipelines
          • Use KerasCV to train powerful image classifiers.
          • CutMix, MixUp, and RandAugment image augmentation with KerasCV
          • High-performance image generation using Stable Diffusion in KerasCV
          • Custom Image Augmentations with BaseImageAugmentationLayer
          • Semantic Segmentation with KerasCV
          • Segment Anything in KerasCV
        • KerasNLP
          • Getting Started with KerasNLP
          • Pretraining a Transformer from scratch with KerasNLP
          • Uploading Models with KerasNLP
        • KerasHub
          • Getting Started with KerasHub
          • Semantic Segmentation with KerasHub
          • Pretraining a Transformer from scratch with KerasHub
          • Uploading Models with KerasHub
          • Classification with KerasHub
          • Segment Anything in KerasHub
          • Stable Diffusion 3 in KerasHub
      • Keras 3 API documentation
        • Models API
          • The Model class
          • The Sequential class
          • Model training APIs
          • Saving & serialization
            • Whole model saving & loading
            • Weights-only saving & loading
            • Model config serialization
            • Model export for inference
            • Serialization utilities
            • Keras weights file editor
        • Layers API
          • The base Layer class
          • Layer activations
          • Layer weight initializers
          • Layer weight regularizers
          • Layer weight constraints
          • Core layers
            • Input object
            • InputSpec object
            • Dense layer
            • EinsumDense layer
            • Activation layer
            • Embedding layer
            • Masking layer
            • Lambda layer
            • Identity layer
          • Convolution layers
            • Conv1D layer
            • Conv2D layer
            • Conv3D layer
            • SeparableConv1D layer
            • SeparableConv2D layer
            • DepthwiseConv1D layer
            • DepthwiseConv2D layer
            • Conv1DTranspose layer
            • Conv2DTranspose layer
            • Conv3DTranspose layer
          • Pooling layers
            • MaxPooling1D layer
            • MaxPooling2D layer
            • MaxPooling3D layer
            • AveragePooling1D layer
            • AveragePooling2D layer
            • AveragePooling3D layer
            • GlobalMaxPooling1D layer
            • GlobalMaxPooling2D layer
            • GlobalMaxPooling3D layer
            • GlobalAveragePooling1D layer
            • GlobalAveragePooling2D layer
            • GlobalAveragePooling3D layer
          • Recurrent layers
            • LSTM layer
            • LSTM cell layer
            • GRU layer
            • GRU Cell layer
            • SimpleRNN layer
            • TimeDistributed layer
            • Bidirectional layer
            • ConvLSTM1D layer
            • ConvLSTM2D layer
            • ConvLSTM3D layer
            • Base RNN layer
            • Simple RNN cell layer
            • Stacked RNN cell layer
          • Preprocessing layers
            • Text preprocessing
              • TextVectorization layers
            • Numerical features preprocessing layers
              • Normalization layer
              • Spectral Normalization layer
              • Discretization layer
            • Categorical features preprocessing layers
              • CategoryEncoding layer
              • Hashing layer
              • HashedCrossing layer
              • StringLookup layer
              • IntegerLookup layer
            • Image preprocessing layers
              • Resizing layer
              • Rescaling layer
              • CenterCrop layer
              • AutoContrast layer
            • Image augmentation layers
              • RandomCrop layer
              • RandomFlip layer
              • RandomTranslation layer
              • RandomRotation layer
              • RandomZoom layer
              • RandomContrast layer
              • RandomBrightness layer
              • Solarization layer
              • Pipeline layer
            • Audio preprocessing layers
              • MelSpectrogram layer
          • Normalization layers
            • BatchNormalization layer
            • LayerNormalization layer
            • UnitNormalization layer
            • GroupNormalization layer
          • Regularization layers
            • Dropout layer
            • SpatialDropout1D layer
            • SpatialDropout2D layer
            • SpatialDropout3D layer
            • GaussianDropout layer
            • AlphaDropout layer
            • GaussianNoise layer
            • ActivityRegularization layer
          • Attention layers
            • GroupQueryAttention
            • MultiHeadAttention layer
            • Attention layer
            • AdditiveAttention layer
          • Reshaping layers
            • Reshape layer
            • Flatten layer
            • RepeatVector layer
            • Permute layer
            • Cropping1D layer
            • Cropping2D layer
            • Cropping3D layer
            • UpSampling1D layer
            • UpSampling2D layer
            • UpSampling3D layer
            • ZeroPadding1D layer
            • ZeroPadding2D layer
            • ZeroPadding3D layer
          • Merging layers
            • Concatenate layer
            • Average layer
            • Maximum layer
            • Minimum layer
            • Add layer
            • Subtract layer
            • Multiply layer
            • Dot layer
          • Activation layers
            • ReLU layer
            • Softmax layer
            • LeakyReLU layer
            • PReLU layer
            • ELU layer
          • Backend-specific layers
            • TorchModuleWrapper layer
            • Tensorflow SavedModel layer
            • JaxLayer
            • FlaxLayer
        • Callbacks API
          • Base Callback class
          • ModelCheckpoint
          • BackupAndRestore
          • TensorBoard
          • EarlyStopping
          • LearningRateScheduler
          • ReduceLROnPlateau
          • RemoteMonitor
          • LambdaCallback
          • TerminateOnNaN
          • CSVLogger
          • ProgbarLogger
          • SwapEMAWeights
        • Ops API
          • NumPy ops
          • NN ops
          • Linear algebra ops
          • Core ops
          • Image ops
          • FFT ops
        • Optimizers
          • SGD
          • RMSprop
          • Adam
          • AdamW
          • Adadelta
          • Adagrad
          • Adamax
          • Adafactor
          • Nadam
          • Ftrl
          • Lion
          • Lamb
          • Loss Scale Optimizer
          • Learning rate schedules API
            • LearningRateSchedule
            • ExponentialDecay
            • PiecewiseConstantDecay
            • PolynomialDecay
            • InverseTimeDecay
            • CosineDecay
            • CosineDecayRestarts
        • Metrics
          • Base Metric class
          • Accuracy metrics
          • Probabilistic metrics
          • Regression metrics
          • Classification metrics based on True/False positives & negatives
          • Image segmentation metrics
          • Hinge metrics for "maximum-margin" classification
          • Metric wrappers and reduction metrics
        • Losses
          • Probabilistic losses
          • Regression losses
          • Hinge losses for "maximum-margin" classification
        • Data loading
          • Image data loading
          • Timeseries data loading
          • Text data loading
          • Audio data loading
        • Built-in small datasets
          • MNIST digits classification dataset
          • CIFAR10 small images classification dataset
          • CIFAR100 small images classification dataset
          • IMDB movie review sentiment classification dataset
          • Reuters newswire classification dataset
          • Fashion MNIST dataset, an alternative to MNIST
          • California Housing price regression dataset
        • Keras Applications
          • Xception
          • EfficientNet B0 to B7
          • EfficientNetV2 B0 to B3 and S, M, L
          • ConvNeXt Tiny, Small, Base, Large, XLarge
          • VGG16 and VGG19
          • ResNet and ResNetV2
          • MobileNet, MobileNetV2, and MobileNetV3
          • DenseNet
          • NasNetLarge and NasNetMobile
          • InceptionV3
          • InceptionResNetV2
        • Mixed precision
          • Mixed precision policy API
        • Multi-device distribution
          • LayoutMap API
          • DataParallel API
          • ModelParallel API
          • Distribution utilities
        • RNG API
          • SeedGenerator class
          • Random operations
        • Utilities
          • Experiment management utilities
          • Model plotting utilities
          • Structured data preprocessing utilities
          • Tensor utilities
          • Python & NumPy utilities
          • Keras configuration utilities
        • KerasTuner
          • HyperParameters
          • Tuners
            • The base Tuner class
            • Objective class
            • RandomSearch Tuner
            • GridSearch Tuner
            • BayesianOptimization Tuner
            • Hyperband Tuner
            • Sklearn Tuner
          • Oracles
            • The base Oracle class
            • @synchronized decorator
            • RandomSearch Oracle
            • GridSearch Oracle
            • BayesianOptimization Oracle
            • Hyperband Oracle
          • HyperModels
            • The base HyperModel class
            • HyperEfficientNet
            • HyperImageAugment
            • HyperResNet
            • HyperXception
          • Errors
        • KerasCV
          • Layers
            • Augmentation layers
              • AutoContrast layer
              • AugMix layer
              • ChannelShuffle layer
              • CutMix layer
              • FourierMix layer
              • GridMask layer
              • JitteredResize layer
              • MixUp layer
              • RandAugment layer
              • RandomAugmentationPipeline layer
              • RandomChannelShift layer
              • RandomColorDegeneration layer
              • RandomCutout layer
              • RandomHue layer
              • RandomSaturation layer
              • RandomSharpness layer
              • RandomShear layer
              • Solarization layer
            • Preprocessing
              • Resizing layer
              • Grayscale layer
              • Equalization layer
              • Posterization layer
            • Regularization
              • DropBlock2D layer
              • DropPath layer
              • SqueezeAndExcite2D layer
              • StochasticDepth layer
          • Models
            • Tasks
              • BASNet Segmentation
              • DeepLabV3Plus Segmentation
              • SegFormer Segmentation
              • Segment Anything
              • CLIP Feature extractor
              • The ImageClassifier model
              • The RetinaNet model
              • StableDiffusion image-generation model
              • The YOLOV8Detector model
            • Backbones
              • CSPDarkNet backbones
              • DenseNet backbones
              • EfficientNetV1 models
              • EfficientNetV2 models
              • EfficientNet Lite backbones
              • MixTransformer backbones
              • MobileNetV3 backbones
              • ResNetV1 backbones
              • ResNetV2 backbones
              • VGG16 backbones
              • ViTDet backbones
              • YOLOV8 backbones
          • Bounding box formats and utilities
            • Bounding box formats
            • Bounding box utilities
              • Convert bounding box formats
              • Compute intersection over union of bounding boxes
              • Clip bounding boxes to be within the bounds of provided images
              • Convert a bounding box dictionary to -1 padded Dense tensors
              • Convert a bounding box dictionary batched Ragged tensors
              • Ensure that your bounding boxes comply with the bounding box spec
          • Losses
            • Binary Penalty Reduced Focal CrossEntropy
            • CIoU Loss
            • Focal Loss
            • GIoU Loss
            • IoU Loss
            • SimCLR Loss
            • SmoothL1Loss Loss
        • KerasNLP
          • Pretrained Models
            • Albert
              • AlbertTokenizer
              • AlbertBackbone model
              • AlbertTextClassifier model
              • AlbertTextClassifierPreprocessor layer
              • AlbertMaskedLM model
              • AlbertMaskedLMPreprocessor layer
            • Bart
              • BertTokenizer
              • BertBackbone model
              • BartSeq2SeqLM model
              • BartSeq2SeqLMPreprocessor layer
            • Bert
              • BertTokenizer
              • BertBackbone model
              • BertTextClassifier model
              • BertTextClassifierPreprocessor layer
              • BertMaskedLM model
              • BertMaskedLMPreprocessor layer
            • Bloom
              • BloomTokenizer
              • BloomBackbone model
              • BloomCausalLM model
              • BloomCausalLMPreprocessor layer
            • DebertaV3
              • DebertaV3Tokenizer
              • DebertaV3Backbone model
              • DebertaV3TextClassifier model
              • DebertaV3TextClassifierPreprocessor layer
              • DebertaV3MaskedLM model
              • DebertaV3MaskedLMPreprocessor layer
            • DistilBERT
              • DistilBertTokenizer
              • DistilBertBackbone model
              • DistilBertTextClassifier model
              • DistilBertTextClassifierPreprocessor layer
              • DistilBertMaskedLM model
              • DistilBertMaskedLMPreprocessor layer
            • Gemma
              • GemmaTokenizer
              • GemmaBackbone model
              • GemmaCausalLM model
              • GemmaCausalLMPreprocessor layer
            • Electra
              • ElectraTokenizer
              • ElectraBackbone model
            • Falcon
              • FalconTokenizer
              • FalconBackbone model
              • FalconCausalLM model
              • FalconCausalLMPreprocessor layer
            • FNet
              • FNetTokenizer
              • FNetBackbone model
              • FNetTextClassifier model
              • FNetTextClassifierPreprocessor layer
              • FNetMaskedLM model
              • FNetMaskedLMPreprocessor layer
            • GPT2
              • GPT2Tokenizer
              • GPT2Backbone model
              • GPT2CausalLM model
              • GPT2CausalLMPreprocessor layer
            • Llama
              • LlamaTokenizer
              • LlamaBackbone model
              • LlamaCausalLM model
              • LlamaCausalLMPreprocessor layer
            • Llama3
              • Llama3Tokenizer
              • Llama3Backbone model
              • Llama3CausalLM model
              • Llama3CausalLMPreprocessor layer
            • Mistral
              • MistralTokenizer
              • MistralBackbone model
              • MistralCausalLM model
              • MistralCausalLMPreprocessor layer
            • OPT
              • OPTTokenizer
              • OPTBackbone model
              • OPTCausalLM model
              • OPTCausalLMPreprocessor layer
            • PaliGemma
              • PaliGemmaTokenizer
              • PaliGemmaBackbone model
              • PaliGemmaCausalLM model
              • PaliGemmaCausalLMPreprocessor layer
            • Phi3
              • Phi3Tokenizer
              • Phi3Backbone model
              • Phi3CausalLM model
              • Phi3CausalLMPreprocessor layer
            • RoBERTa
              • RobertaTokenizer
              • RobertaBackbone model
              • RobertaTextClassifier model
              • RobertaTextClassifierPreprocessor layer
              • RobertaMaskedLM model
              • RobertaMaskedLMPreprocessor layer
            • XLM-RoBERTa
              • XLMRobertaTokenizer
              • XLMRobertaBackbone model
              • XLMRobertaTextClassifier model
              • XLMRobertaTextClassifierPreprocessor layer
              • XLMRobertaMaskedLM model
              • XLMRobertaMaskedLMPreprocessor layer
          • Models API
            • Backbone
            • Task
            • Preprocessor
            • CausalLM
            • CausalLMPreprocessor
            • Seq2SeqLM
            • Seq2SeqLMPreprocessor
            • TextClassifier
            • TextClassifierPreprocessor
            • MaskedLM
            • MaskedLMPreprocessor
            • upload_preset
          • Tokenizers
            • Tokenizer
            • WordPieceTokenizer
            • SentencePieceTokenizer
            • BytePairTokenizer
            • ByteTokenizer
            • UnicodeCodepointTokenizer
            • compute_word_piece_vocabulary function
            • compute_sentence_piece_proto function
          • Preprocessing Layers
            • StartEndPacker layer
            • MultiSegmentPacker layer
            • RandomSwap layer
            • RandomDeletion layer
            • MaskedLMMaskGenerator layer
          • Modeling Layers
            • TransformerEncoder layer
            • TransformerDecoder layer
            • FNetEncoder layer
            • PositionEmbedding layer
            • RotaryEmbedding layer
            • SinePositionEncoding layer
            • ReversibleEmbedding layer
            • TokenAndPositionEmbedding layer
            • AlibiBias layer
            • MaskedLMHead layer
            • CachedMultiHeadAttention layer
          • Samplers
            • Sampler base class
            • BeamSampler
            • ContrastiveSampler
            • GreedySampler
            • RandomSampler
            • TopKSampler
            • TopPSampler
          • Metrics
            • Perplexity metric
        • KerasHub
          • Pretrained Models
            • Albert
              • AlbertTokenizer
              • AlbertBackbone model
              • AlbertTextClassifier model
              • AlbertTextClassifierPreprocessor layer
              • AlbertMaskedLM model
              • AlbertMaskedLMPreprocessor layer
            • Bart
              • BertTokenizer
              • BertBackbone model
              • BartSeq2SeqLM model
              • BartSeq2SeqLMPreprocessor layer
            • Bert
              • BertTokenizer
              • BertBackbone model
              • BertTextClassifier model
              • BertTextClassifierPreprocessor layer
              • BertMaskedLM model
              • BertMaskedLMPreprocessor layer
            • Bloom
              • BloomTokenizer
              • BloomBackbone model
              • BloomCausalLM model
              • BloomCausalLMPreprocessor layer
            • DebertaV3
              • DebertaV3Tokenizer
              • DebertaV3Backbone model
              • DebertaV3TextClassifier model
              • DebertaV3TextClassifierPreprocessor layer
              • DebertaV3MaskedLM model
              • DebertaV3MaskedLMPreprocessor layer
            • DeepLabV3 and DeepLabV3Plus
              • DeepLabV3ImageConverter
              • DeepLabV3Backbone model
              • DeepLabV3ImageSegmenter model
              • DeepLabV3ImageSegmenterPreprocessor layer
            • DenseNet
              • DenseNetImageConverter
              • DensNetBackbone model
              • DenseNetImageClassifier model
              • DenseNetImageClassifierPreprocessor layer
            • DistilBERT
              • DistilBertTokenizer
              • DistilBertBackbone model
              • DistilBertTextClassifier model
              • DistilBertTextClassifierPreprocessor layer
              • DistilBertMaskedLM model
              • DistilBertMaskedLMPreprocessor layer
            • Electra
              • ElectraTokenizer
              • ElectraBackbone model
            • Falcon
              • FalconTokenizer
              • FalconBackbone model
              • FalconCausalLM model
              • FalconCausalLMPreprocessor layer
            • FNet
              • FNetTokenizer
              • FNetBackbone model
              • FNetTextClassifier model
              • FNetTextClassifierPreprocessor layer
              • FNetMaskedLM model
              • FNetMaskedLMPreprocessor layer
            • Gemma
              • GemmaTokenizer
              • GemmaBackbone model
              • GemmaCausalLM model
              • GemmaCausalLMPreprocessor layer
            • GPT2
              • GPT2Tokenizer
              • GPT2Backbone model
              • GPT2CausalLM model
              • GPT2CausalLMPreprocessor layer
            • Llama
              • LlamaTokenizer
              • LlamaBackbone model
              • LlamaCausalLM model
              • LlamaCausalLMPreprocessor layer
            • Llama3
              • Llama3Tokenizer
              • Llama3Backbone model
              • Llama3CausalLM model
              • Llama3CausalLMPreprocessor layer
            • Mistral
              • MistralTokenizer
              • MistralBackbone model
              • MistralCausalLM model
              • MistralCausalLMPreprocessor layer
            • MiT
              • MiTImageConverter
              • MiTBackbone model
              • MiTImageClassifier model
              • MiTImageClassifierPreprocessor layer
            • OPT
              • OPTTokenizer
              • OPTBackbone model
              • OPTCausalLM model
              • OPTCausalLMPreprocessor layer
            • PaliGemma
              • PaliGemmaTokenizer
              • PaliGemmaBackbone model
              • PaliGemmaCausalLM model
              • PaliGemmaCausalLMPreprocessor layer
            • Phi3
              • Phi3Tokenizer
              • Phi3Backbone model
              • Phi3CausalLM model
              • Phi3CausalLMPreprocessor layer
            • ResNet
              • ResNetImageConverter
              • ResNetBackbone model
              • ResNetImageClassifier model
              • ResNetImageClassifierPreprocessor layer
            • RoBERTa
              • RobertaTokenizer
              • RobertaBackbone model
              • RobertaTextClassifier model
              • RobertaTextClassifierPreprocessor layer
              • RobertaMaskedLM model
              • RobertaMaskedLMPreprocessor layer
            • Segment Anything Model
              • SAMImageConverter
              • SAMBackbone model
              • SAMImageSegmenter model
              • SAMImageSegmenterPreprocessor layer
              • SAMPromptEncoder layer
              • SAMMaskDecoder layer
            • Stable Diffusion 3
              • SAMImageConverter
              • StableDiffusion3Backbone model
              • StableDiffusion3TextToImage model
              • StableDiffusion3TextToImagePreprocessor layer
              • StableDiffusion3ImageToImage model
              • StableDiffusion3Inpaint model
            • T5
              • T5Tokenizer
              • T5Backbone model
              • T5Preprocessor layer
            • VGG
              • VGGImageConverter
              • VGGBackbone model
              • VGGImageClassifier model
              • VGGImageClassifierPreprocessor layer
            • ViTDet
              • VitDet model
            • Whisper
              • WhisperTokenizer
              • WhisperAudioConverter
              • WhisperBackbone model
            • XLM-RoBERTa
              • XLMRobertaTokenizer
              • XLMRobertaBackbone model
              • XLMRobertaTextClassifier model
              • XLMRobertaTextClassifierPreprocessor layer
              • XLMRobertaMaskedLM model
              • XLMRobertaMaskedLMPreprocessor layer
          • Models API
            • Backbone
            • CausalLM
            • CausalLMPreprocessor
            • ImageClassifier
            • ImageClassifierPreprocessor
            • ImageToImage
            • ImageSegmenter
            • Inpaint
            • MaskedLM
            • MaskedLMPreprocessor
            • Preprocessor
            • Seq2SeqLM
            • Seq2SeqLMPreprocessor
            • Task
            • TextClassifier
            • TextClassifierPreprocessor
            • TextToImage
            • upload_preset
          • Tokenizers
            • Tokenizers
            • WordPieceTokenizer
            • SentencePieceTokenizer
            • BytePairTokenizer
            • ByteTokenizer
            • UnicodeCodepointTokenizer
            • compute_word_piece_vocabulary function
            • compute_sentence_piece_proto function
          • Preprocessing Layers
            • AudioConverter layer
            • ImageConverter layer
            • StartEndPacker layer
            • MultiSegmentPacker layer
            • RandomSwap layer
            • RandomDeletion layer
            • MaskedLMMaskGenerator layer
          • Modeling Layers
            • TransformerEncoder layer
            • TransformerDecoder layer
            • FNetEncoder layer
            • PositionEmbedding layer
            • RotaryEmbedding layer
            • SinePositionEncoding layer
            • ReversibleEmbedding layer
            • TokenAndPositionEmbedding layer
            • AlibiBias layer
            • MaskedLMHead layer
            • CachedMultiHeadAttention layer
          • Samplers
            • Sampler base class
            • BeamSampler
            • ContrastiveSampler
            • GreedySampler
            • RandomSampler
            • TopKSampler
            • TopPSampler
          • Metrics
            • Perplexity metric
      • Code examples
        • Computer Vision
          • Image classification from scratch
          • Simple MNIST convnet
          • Image classification via fine-tuning with EfficientNet
          • Image classification with Vision Transformer
          • Classification using Attention-based Deep Multiple Instance Learning
          • Image classification with modern MLP models
          • A mobile-friendly Transformer-based model for image classification
          • Pneumonia Classification on TPU
          • Compact Convolutional Transformers
          • Image classification with ConvMixer
          • Image classification with EANet (External Attention Transformer)
          • Involutional neural networks
          • Image classification with Perceiver
          • Few-Shot learning with Reptile
          • Semi-supervised image classification using contrastive pretraining with SimCLR
          • Image classification with Swin Transformers
          • Train a Vision Transformer on small datasets
          • A Vision Transformer without Attention
          • Image Classification using Global Context Vision Transformer
          • Image segmentation with a U-Net-like architecture
          • Multiclass semantic segmentation using DeepLabV3+
          • Highly accurate boundaries segmentation using BASNet
          • Image Segmentation using Composable Fully-Convolutional Networks
          • Object Detection with RetinaNet
          • Keypoint Detection with Transfer Learning
          • Object detection with Vision Transformers
          • 3D image classification from CT scans
          • Monocular depth estimation
          • 3D volumetric rendering with NeRF
          • Point cloud segmentation with PointNet
          • Point cloud classification with PointNet
          • OCR model for reading Captchas
          • Handwriting recognition
          • Convolutional autoencoder for image denoising
          • Low-light image enhancement using MIRNet
          • Image Super-Resolution using an Efficient Sub-Pixel CNN
          • Enhanced Deep Residual Networks for single-image super-resolution
          • Zero-DCE for low-light image enhancement
          • CutMix data augmentation for image classification
          • MixUp augmentation for image classification
          • RandAugment for Image Classification for Improved Robustness
          • Image Captioning
          • Natural language image search with a Dual Encoder
          • Visualizing what convnets learn
          • Model interpretability with Integrated Gradients
          • Investigating Vision Transformer representations
          • Grad-CAM class activation visualization
          • Near-duplicate image search
          • Semantic Image Clustering
          • Image similarity estimation using a Siamese Network with a contrastive loss
          • Image similarity estimation using a Siamese Network with a triplet loss
          • Metric learning for image similarity search
          • Metric learning for image similarity search using TensorFlow Similarity
          • Self-supervised contrastive learning with NNCLR
          • Video Classification with a CNN-RNN Architecture
          • Next-Frame Video Prediction with Convolutional LSTMs
          • Video Classification with Transformers
          • Video Vision Transformer
          • Image Classification using BigTransfer (BiT)
          • Gradient Centralization for Better Training Performance
          • Learning to tokenize in Vision Transformers
          • Knowledge Distillation
          • FixRes: Fixing train-test resolution discrepancy
          • Class Attention Image Transformers with LayerScale
          • Augmenting convnets with aggregated attention
          • Learning to Resize in Computer Vision
          • Semi-supervision and domain adaptation with AdaMatch
          • Barlow Twins for Contrastive SSL
          • Consistency training with supervision
          • Distilling Vision Transformers
          • Focal Modulation: A replacement for Self-Attention
          • Using the Forward-Forward Algorithm for Image Classification
          • Masked image modeling with Autoencoders
          • Segment Anything Model with 🤗Transformers
          • Semantic segmentation with SegFormer and Hugging Face Transformers
          • Self-supervised contrastive learning with SimSiam
          • Supervised Contrastive Learning
          • When Recurrence meets Transformers
          • Efficient Object Detection with YOLOV8 and KerasCV
        • Natural Language Processing
          • Text classification from scratch
          • Review Classification using Active Learning
          • Text Classification using FNet (KerasHub)
          • Text Classification using FNet (KerasNLP)
          • Large-scale multi-label text classification
          • Text classification with Transformer
          • Text classification with Switch Transformer
          • Text classification using Decision Forests and pretrained embeddings
          • Using pre-trained word embeddings
          • Bidirectional LSTM on IMDB
          • Data Parallel Training with KerasHub and tf.distribute
          • Data Parallel Training with KerasNLP and tf.distribute
          • English-to-Spanish translation with KerasHub
          • English-to-Spanish translation with KerasNLP
          • English-to-Spanish translation with a sequence-to-sequence Transformer
          • Character-level recurrent sequence-to-sequence model
          • Multimodal entailment
          • Named Entity Recognition using Transformers
          • Text Extraction with BERT
          • Sequence to sequence learning for performing number addition
          • Semantic Similarity with KerasHub
          • Semantic Similarity with KerasNLP
          • Semantic Similarity with BERT
          • Sentence embeddings using Siamese RoBERTa-networks
          • End-to-end Masked Language Modeling with BERT
          • Abstractive Text Summarization with BART
          • Pretraining BERT with Hugging Face Transformers
          • Parameter-efficient fine-tuning of GPT-2 with LoRA
          • Training a language model from scratch with 🤗 Transformers and TPUs
          • MultipleChoice Task with Transfer Learning
          • Question Answering with Hugging Face Transformers
          • Abstractive Summarization with Hugging Face Transformers
        • Structured Data
          • Structured data classification with FeatureSpace
          • FeatureSpace advanced use cases
          • Imbalanced classification: credit card fraud detection
          • Structured data classification from scratch
          • Structured data learning with Wide, Deep, and Cross networks
          • Classification with Gated Residual and Variable Selection Networks
          • Classification with TensorFlow Decision Forests
          • Classification with Neural Decision Forests
          • Structured data learning with TabTransformer
          • Collaborative Filtering for Movie Recommendations
          • A Transformer-based recommendation system
        • Timeseries
          • Timeseries classification from scratch
          • Timeseries classification with a Transformer model
          • Electroencephalogram Signal Classification for action identification
          • Event classification for payment card fraud detection
          • Timeseries anomaly detection using an Autoencoder
          • Traffic forecasting using graph neural networks and LSTM
          • Timeseries forecasting for weather prediction
        • Generative Deep Learning
          • Denoising Diffusion Implicit Models
          • A walk through latent space with Stable Diffusion
          • DreamBooth
          • Denoising Diffusion Probabilistic Model
          • Teach StableDiffusion new concepts via Textual Inversion
          • Fine-tuning Stable Diffusion
          • Variational AutoEncoder
          • DCGAN to generate face images
          • WGAN-GP overriding `Model.train_step`
          • Conditional GAN
          • CycleGAN
          • Data-efficient GANs with Adaptive Discriminator Augmentation
          • Deep Dream
          • GauGAN for conditional image generation
          • PixelCNN
          • Face image generation with StyleGAN
          • Vector-Quantized Variational Autoencoders
          • Neural style transfer
          • Neural Style Transfer with AdaIN
          • GPT2 Text Generation with KerasHub
          • GPT2 Text Generation with KerasNLP
          • GPT text generation from scratch with KerasHub
          • Text generation with a miniature GPT
          • Character-level text generation with LSTM
          • Text Generation using FNet
          • Drug Molecule Generation with VAE
          • WGAN-GP with R-GCN for the generation of small molecular graphs
          • A walk through latent space with Stable Diffusion 3
          • Density estimation using Real NVP
        • Audio Data
          • Automatic Speech Recognition with Transformer
          • Automatic Speech Recognition using CTC
          • MelGAN-based spectrogram inversion using feature matching
          • Speaker Recognition
          • Audio Classification with the STFTSpectrogram layer
          • English speaker accent recognition using Transfer Learning
          • Audio Classification with Hugging Face Transformers
        • Reinforcement Learning
          • Actor Critic Method
          • Proximal Policy Optimization
          • Deep Q-Learning for Atari Breakout
          • Deep Deterministic Policy Gradient (DDPG)
        • Graph Data
          • Graph attention network (GAT) for node classification
          • Node Classification with Graph Neural Networks
          • Message-passing neural network (MPNN) for molecular property prediction
          • Graph representation learning with node2vec
        • Quick Keras Recipes
          • Parameter-efficient fine-tuning of Gemma with LoRA and QLoRA
          • Float8 training and inference with a simple Transformer model
          • Serving TensorFlow models with TFServing
          • Keras debugging tips
          • Customizing the convolution operation of a Conv2D layer
          • Trainer pattern
          • Endpoint layer pattern
          • Reproducibility in Keras Models
          • Writing Keras Models With TensorFlow NumPy
          • Simple custom layer example: Antirectifier
          • Estimating required sample size for model training
          • Memory-efficient embeddings for recommendation systems
          • Creating TFRecords
          • Packaging Keras models for wide distribution using Functional Subclassing
          • Approximating non-Function Mappings with Mixture Density Networks
          • Probabilistic Bayesian Neural Networks
          • Knowledge distillation recipes
          • Evaluating and exporting scikit-learn metrics in a Keras callback
          • How to train a Keras model on TFRecord files
      • KerasTuner
      • KerasHub
      • KerasCV
      • KerasNLP
      • English
      • 한국어

      On this page

      • VGGImageConverter
      • VGGBackbone model
      • VGGImageClassifier model
      • VGGImageClassifierPreprocessor layer
      Keras
      Keras 3 API documentation
      KerasHub
      Pretrained Models
      VGG

      VGG

      • Original Link : https://keras.io/api/keras_hub/models/vgg/
      • Last Checked at : 2024-11-26

      VGGImageConverter

      • VGGImageConverter class
      • from_preset method

      VGGBackbone model

      • VGGBackbone class
      • from_preset method

      VGGImageClassifier model

      • VGGImageClassifier class
      • from_preset method
      • backbone property
      • preprocessor property

      VGGImageClassifierPreprocessor layer

      • VGGImageClassifierPreprocessor class
      • from_preset method
      • image_converter property
      Powered by Hextra