code: def __init__(self, opt, num_features, dict):
      super().__init__()
      self.lt = nn.Embedding(
          num_features,
          opt["embeddingsize"],
          0,
          sparse=True,
      )
      if not opt["tfidf"]:
          dict = None
      self.encoder = Encoder(self.lt, dict)
      if not opt["share_embeddings"]:
          self.lt2 = nn.Embedding(
              num_features,
              opt["embeddingsize"],
              0,
              sparse=True,
          )
          self.encoder2 = Encoder(self.lt2, dict)
      else:
          self.encoder2 = self.encoder
      self.opt = opt
      self.lin = nn.Linear(
          opt["embeddingsize"], opt["embeddingsize"], bias=False
      )
      self.lins = 0
      if "lins" in opt:
          self.lins = opt["lins"]
  
file_path: ParlAI/parlai/agents/starspace/modules.py
imports: import math
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new Starspace object from inherited base classes: nn with example: obj = Starspace(opt, num_features, dict)