in src/utils.py [0:0]
def color_quantize(x, np_clusters): clusters = tf.Variable(np_clusters, dtype=tf.float32, trainable=False) x = tf.reshape(x, [-1, 3]) d = squared_euclidean_distance(x, clusters) return tf.argmin(d, 1)