class_docstr: Internal class to create the op to initialize the clusters.
  
  The op performs this algorithm (see constructor args):
  
  num_remaining = num_clusters - length(cluster_centers)
  if num_remaining == 0:
    assert that cluster_centers_initialized is true
  else:
    assert that num_remaining > 0
    new_centers = choose up to num_remaining initial centers
    l2-normalize new_centers if using cosine distance
    all_centers = concat(cluster_centers, new_centers)
    cluster_centers := all_centers
    if there is a cluster_centers_updated variable:
      cluster_centers_updated := cluster_centers
    num_now_remaining = num_clusters - length(cluster_centers)
    if num_now_remaining == 0:
      cluster_centers_initialized := true
class_docstr_tok: ["Internal","class","to","create","the","op","to","initialize","the","clusters",".","The","op","performs","this","algorithm","(","see","constructor","args",")",":","num_remaining","=","num_clusters","-","length","(","cluster_centers",")","if","num_remaining","==","0",":","assert","that","cluster_centers_initialized","is","true","else",":","assert","that","num_remaining",">","0","new_centers","=","choose","up","to","num_remaining","initial","centers","l2-normalize","new_centers","if","using","cosine","distance","all_centers","=","concat","(","cluster_centers",",","new_centers",")","cluster_centers",":","=","all_centers","if","there","is","a","cluster_centers_updated","variable",":","cluster_centers_updated",":","=","cluster_centers","num_now_remaining","=","num_clusters","-","length","(","cluster_centers",")","if","num_now_remaining","==","0",":","cluster_centers_initialized",":","=","true"]
code: def _kmeans_plus_plus(self):
      # Points from only the first shard are used for initializing centers.
      # TODO(ands): Use all points.
      inp = self._inputs[0]
      if self._distance_metric == COSINE_DISTANCE:
          inp = nn_impl.l2_normalize(inp, dim=1)
      return gen_clustering_ops.kmeans_plus_plus_initialization(
          inp,
          math_ops.cast(self._num_remaining, dtypes.int64),
          self._seed,
          self._kmeans_plus_plus_num_retries,
      )
  
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import gen_clustering_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import while_loop
  from tensorflow.python.ops.embedding_ops import embedding_lookup
  from tensorflow.python.ops.gen_clustering_ops import *
label_desc: Use image node_id 3 for calling the _InitializeClustersOpFactory obj's underlying member method code with example usage: obj._kmeans_plus_plus() and returns: gen_clustering_ops