docstr: Simple version of Node2Vec/DeepWalk algorithm.
  
  Args:
      dict_size: the total number of nodes.
      degrees: numpy array of node degrees, ordered as in the data's id_map
      nodevec_dim: dimension of the vector representation of node.
      lr: learning rate of optimizer.
docstr_tok: ["Simple","version","of","Node2Vec\/DeepWalk","algorithm",".","Args",":","dict_size",":","the","total","number","of","nodes",".","degrees",":","numpy","array","of","node","degrees",",","ordered","as","in","the","data","'s","id_map","nodevec_dim",":","dimension","of","the","vector","representation","of","node",".","lr",":","learning","rate","of","optimizer","."]
code: def __init__(
      self,
      placeholders,
      dict_size,
      degrees,
      name=None,
      nodevec_dim=50,
      lr=0.001,
      **kwargs,
  ):
      """Simple version of Node2Vec/DeepWalk algorithm.
  
      Args:
          dict_size: the total number of nodes.
          degrees: numpy array of node degrees, ordered as in the data's id_map
          nodevec_dim: dimension of the vector representation of node.
          lr: learning rate of optimizer.
      """
  
      super(Node2VecModel, self).__init__(**kwargs)
  
      self.placeholders = placeholders
      self.degrees = degrees
      self.inputs1 = placeholders["batch1"]
      self.inputs2 = placeholders["batch2"]
  
      self.batch_size = placeholders["batch_size"]
      self.hidden_dim = nodevec_dim
  
      # following the tensorflow word2vec tutorial
      self.target_embeds = tf.Variable(
          tf.random_uniform([dict_size, nodevec_dim], -1, 1),
          name="target_embeds",
      )
      self.context_embeds = tf.Variable(
          tf.truncated_normal(
              [dict_size, nodevec_dim],
              stddev=1.0 / math.sqrt(nodevec_dim),
          ),
          name="context_embeds",
      )
      self.context_bias = tf.Variable(
          tf.zeros([dict_size]), name="context_bias"
      )
  
      self.optimizer = tf.train.GradientDescentOptimizer(
          learning_rate=lr
      )
  
      self.build()
  
imports: from collections import namedtuple
  import tensorflow
  import math
  import graphsage.layers
  import graphsage.metrics
  from .prediction import BipartiteEdgePredLayer
  from .aggregators import MeanAggregator, MaxPoolingAggregator, MeanPoolingAggregator, SeqAggregator, GCNAggregator
label_desc: Use image node_id 1 to create a new Node2VecModel object from inherited base classes: GeneralizedModel with example: obj = Node2VecModel(placeholders, dict_size, degrees, name, nodevec_dim, lr)