class_docstr: Sparse Embedding for Knowledge Graph
  It is used to store both entity embeddings and relation embeddings.
  
  Parameters
  ----------
  num : int
      Number of embeddings.
  dim : int
      Embedding dimention size.
  device : th.device
      Device to store the embedding.
class_docstr_tok: ["Sparse","Embedding","for","Knowledge","Graph","It","is","used","to","store","both","entity","embeddings","and","relation","embeddings",".","Parameters","--","--","--","--","--","num",":","int","Number","of","embeddings",".","dim",":","int","Embedding","dimention","size",".","device",":","th.device","Device","to","store","the","embedding","."]
docstr: Use torch.tensor.share_memory_() to allow cross process tensor access
          
docstr_tok: ["Use","torch.tensor.share_memory_","(",")","to","allow","cross","process","tensor","access"]
code: def share_memory(self):
      """Use torch.tensor.share_memory_() to allow cross process tensor access"""
      self.emb.share_memory_()
      self.state_sum.share_memory_()
  
imports: import os
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.nn.init
  import torch.multiprocessing
  from torch.multiprocessing import Queue
  from _thread import start_new_thread
  import traceback
  from functools import wraps
  from ..None import *
  from .tensor_models import thread_wrapped_func
label_desc: Use image node_id 10 for calling the KGEmbedding obj's underlying member method code with example usage: obj.share_memory() without return types