code: def __init__(self, config):
      super(SkipGramModel, self).__init__()
  
      self.config = config
      self.embed_size = self.config.embed_size
      self.neg_num = self.config.neg_num
  
      embed_init = nn.initializer.Uniform(
          low=-1.0 / math.sqrt(self.embed_size),
          high=1.0 / math.sqrt(self.embed_size),
      )
      emb_attr = paddle.ParamAttr(
          name="node_embedding", initializer=embed_init
      )
  
      if config.sparse_embed:
          self.embedding = SparseEmbedding(
              self.config.num_nodes,
              self.embed_size,
              weight_attr=emb_attr,
          )
      else:
          self.embedding = nn.Embedding(
              self.config.num_nodes,
              self.embed_size,
              weight_attr=emb_attr,
          )
  
      self.loss_fn = paddle.nn.BCEWithLogitsLoss()
  
file_path: PGL/examples/metapath2vec/model.py
imports: import math
  import time
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 1 to create a new SkipGramModel object from inherited base classes: nn with example: obj = SkipGramModel(config)