class_docstr: Sparse Embedding for Knowledge Graph
  It is used to store both entity embeddings and relation embeddings.
  
  Parameters
  ----------
  args :
      Global configs.
  num : int
      Number of embeddings.
  dim : int
      Embedding dimention size.
  ctx : mx.ctx
      Device context to store the embedding.
class_docstr_tok: ["Sparse","Embedding","for","Knowledge","Graph","It","is","used","to","store","both","entity","embeddings","and","relation","embeddings",".","Parameters","--","--","--","--","--","args",":","Global","configs",".","num",":","int","Number","of","embeddings",".","dim",":","int","Embedding","dimention","size",".","ctx",":","mx.ctx","Device","context","to","store","the","embedding","."]
code: def __init__(self, args, num, dim, ctx):
      self.gpu = args.gpu
      self.args = args
      self.trace = []
  
      self.emb = nd.empty((num, dim), dtype=np.float32, ctx=ctx)
      self.state_sum = nd.zeros(
          (self.emb.shape[0]), dtype=np.float32, ctx=ctx
      )
      self.state_step = 0
  
imports: import os
  import numpy
  import mxnet
  from mxnet import gluon
  from mxnet import ndarray
  from .score_fun import *
  from ..None import *
label_desc: Use image node_id 1 to create a new ExternalEmbedding object  with example: obj = ExternalEmbedding(args, num, dim, ctx)