src/transformers/models/deit/modeling_deit.py/DeiTForImageClassification/__init__
class DeiTForImageClassification:    def __init__(self, config):
        super().__init__(config)

        self.num_labels = config.num_labels
        self.deit = DeiTModel(config, add_pooling_layer=False)

        # Classifier head
        self.classifier = nn.Linear(config.hidden_size, config.num_labels) if config.num_labels > 0 else nn.Identity()

        self.init_weights()