src/transformers/models/imagegpt/modeling_imagegpt.py/ImageGPTForImageClassification/__init__
class ImageGPTForImageClassification:    def __init__(self, config: ImageGPTConfig):
        super().__init__(config)
        self.num_labels = config.num_labels
        self.transformer = ImageGPTModel(config)
        self.score = nn.Linear(config.n_embd, self.num_labels, bias=False)

        # Initialize weights and apply final processing
        self.post_init()