class_docstr: Base implementation of unsupervised GraphSAGE
class_docstr_tok: ["Base","implementation","of","unsupervised","GraphSAGE"]
code: def build(self):
      self._build()
  
      # TF graph management
      self._loss()
      self._accuracy()
      self.loss = self.loss / tf.cast(self.batch_size, tf.float32)
      grads_and_vars = self.optimizer.compute_gradients(self.loss)
      clipped_grads_and_vars = [
          (
              tf.clip_by_value(grad, -5.0, 5.0)
              if grad is not None
              else None,
              var,
          )
          for grad, var in grads_and_vars
      ]
      self.grad, _ = clipped_grads_and_vars[0]
      self.opt_op = self.optimizer.apply_gradients(
          clipped_grads_and_vars
      )
  
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 5 for calling the SampleAndAggregate obj's underlying member method code with example usage: obj.build() without return types