class_docstr: Classification head and pooler.
class_docstr_tok: ["Classification","head","and","pooler","."]
code: def __init__(self, config):
      super().__init__(config)
      self.cfg = OmegaConf.create(config.arch)
      self.num_labels = getattr(
          config, "num_labels", self.cfg.num_labels
      )
  
      self.encoder = ScriptableLM(config)
      self.pooler = PoolingComponent(
          self.cfg.classification_head, self.cfg.hidden_size
      )
      self.head = torch.nn.Linear(
          self.cfg.classification_head.head_dim, self.num_labels
      )
  
      self.problem_type = None
      self._init_weights()
  
imports: import torch
  from transformers import PretrainedConfig, PreTrainedModel
  from transformers import AutoConfig, AutoModel, AutoModelForMaskedLM, AutoModelForSequenceClassification, AutoModelForTokenClassification
  from typing import Optional
  from omegaconf import OmegaConf
  from .fff import FFF
  from .components import _get_norm_fn, _get_nonlin_fn, EmbeddingComponent, PoolingComponent, PredictionHeadComponent, GLU, get_extended_attention_mask, _init_module
  from .attention import get_attention_mechanism
label_desc: Use image node_id 1 to create a new ScriptableLMForSequenceClassification object from inherited base classes: PreTrainedModel with example: obj = ScriptableLMForSequenceClassification(config)