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.
  device : th.device
      Device to store the embedding.
code: def get_noncross_idx(self, idx):
      cpu_mask = self.cpu_bitmap[idx]
      gpu_mask = ~cpu_mask
      return idx[gpu_mask]
  
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 *
label_desc: Use image node_id 4 for calling the ExternalEmbedding obj's underlying member method code with example usage: obj.get_noncross_idx(idx) and returns: idx