code: def build_graph(self, x, label):
      # embed them
      x = self.embed(x)
      x = tf.identity(x, name="emb")
  
      # compute the embedding loss
      emb_cost = center_loss(x, label, 10, 0.01)
      # compute the classification loss
      logits = slim.layers.fully_connected(
          tf.nn.relu(x), 10, activation_fn=None, scope="logits"
      )
  
      cls_cost = tf.reduce_mean(
          tf.nn.sparse_softmax_cross_entropy_with_logits(
              logits=logits, labels=label
          ),
          name="classification_costs",
      )
      total_cost = tf.add(emb_cost, 100 * cls_cost, name="cost")
  
      # track these values during training
      add_moving_summary(total_cost, cls_cost, emb_cost)
      return total_cost
  
imports: import argparse
  import numpy
  import tensorflow
  import tensorflow.contrib.slim
  from tensorpack import *
  from tensorpack.tfutils.summary import add_moving_summary
  from tensorpack.utils.gpu import change_gpu
  from embedding_data import MnistPairs, MnistTriplets, get_test_data
label_desc: Use image node_id 3 for calling the CenterModel obj's underlying member method code with example usage: obj.build_graph(x, label) and returns: total_cost