class_docstr: Compute node features for each node in the graph.
class_docstr_tok: ["Compute","node","features","for","each","node","in","the","graph","."]
code: def __init__(self, config: GraphormerConfig):
      super().__init__()
      self.num_heads = config.num_attention_heads
      self.num_atoms = config.num_atoms
  
      self.atom_encoder = nn.Embedding(
          config.num_atoms + 1,
          config.hidden_size,
          padding_idx=config.pad_token_id,
      )
      self.in_degree_encoder = nn.Embedding(
          config.num_in_degree,
          config.hidden_size,
          padding_idx=config.pad_token_id,
      )
      self.out_degree_encoder = nn.Embedding(
          config.num_out_degree,
          config.hidden_size,
          padding_idx=config.pad_token_id,
      )
  
      self.graph_token = nn.Embedding(1, config.hidden_size)
  
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 GraphormerGraphNodeFeature object from inherited base classes: nn with example: obj = GraphormerGraphNodeFeature(config)