class_docstr: This model can be used for graph-level classification or regression tasks.
  
  It can be trained on
  - regression (by setting config.num_classes to 1); there should be one float-type label per graph
  - one task classification (by setting config.num_classes to the number of classes); there should be one integer
    label per graph
  - binary multi-task classification (by setting config.num_classes to the number of labels); there should be a list
    of integer labels for each graph.
class_docstr_tok: ["This","model","can","be","used","for","graph-level","classification","or","regression","tasks",".","It","can","be","trained","on","-","regression","(","by","setting","config.num_classes","to","1",")",";","there","should","be","one","float-type","label","per","graph","-","one","task","classification","(","by","setting","config.num_classes","to","the","number","of","classes",")",";","there","should","be","one","integer","label","per","graph","-","binary","multi-task","classification","(","by","setting","config.num_classes","to","the","number","of","labels",")",";","there","should","be","a","list","of","integer","labels","for","each","graph","."]
code: def __init__(self, config: GraphormerConfig):
      super().__init__(config)
      self.encoder = GraphormerModel(config)
      self.embedding_dim = config.embedding_dim
      self.num_classes = config.num_classes
      self.classifier = GraphormerDecoderHead(
          self.embedding_dim, self.num_classes
      )
      self.is_encoder_decoder = True
  
      # Initialize weights and apply final processing
      self.post_init()
  
imports: import math
  from typing import Iterable, Iterator, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutputWithNoAttention, SequenceClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import logging
  from .configuration_graphormer import GraphormerConfig
label_desc: Use image node_id 1 to create a new GraphormerForGraphClassification object from inherited base classes: GraphormerPreTrainedModel with example: obj = GraphormerForGraphClassification(config)