code: def __init__(
      self,
      node_type,
      edge_type,
      max_id,
      metapath,
      fanouts,
      dim,
      aggregator="mean",
      concat=False,
      feature_idx=-1,
      feature_dim=0,
      use_feature=None,
      use_id=False,
      sparse_feature_idx=-1,
      sparse_feature_max_id=-1,
      embedding_dim=16,
      use_hash_embedding=False,
      use_residual=False,
      num_negs=5,
      metric="mrr",
      *args,
      **kwargs,
  ):
      super(DGI, self).__init__(
          node_type,
          edge_type,
          max_id,
          dim,
          num_negs,
          metric,
          *args,
          **kwargs,
      )
  
      self._target_encoder = (
          tf_euler.python.utils.encoders.ShuffleSageEncoder(
              metapath,
              fanouts,
              dim,
              aggregator,
              concat,
              feature_idx=feature_idx,
              feature_dim=feature_dim,
              max_id=max_id,
              use_id=use_id,
              sparse_feature_idx=sparse_feature_idx,
              sparse_feature_max_id=sparse_feature_max_id,
              embedding_dim=embedding_dim,
              use_hash_embedding=use_hash_embedding,
              use_residual=use_residual,
          )
      )
  
file_path: euler/examples/dgi/dgi.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import tf_euler
label_desc: Use image node_id 1 to create a new DGI object from inherited base classes: DGIBase with example: obj = DGI(node_type, edge_type, max_id, metapath, fanouts, dim, aggregator, concat, feature_idx, feature_dim, use_feature, use_id, sparse_feature_idx, sparse_feature_max_id, embedding_dim, use_hash_embedding, use_residual, num_negs, metric)