Cluster Centroids in Deep Embedding Clustering


Hi, I’m new to MxNet and am trying to use the Deep Embedding Clustering example found here:

After training, I wish to get the cluster centroids generated by DEC and feed this into the decoder. How could I go about doing this?



The cluster centroids generated by DEC is actually computed by the sklean.cluster.KMeans object used to fit the kmeans model on the embeddings.

It can be obtained by running a forward pass for all of the data on the trained encoder, calling on the embeddings for all the training data and calling kmeans.cluster_centers_ to retreive the centroids, which can then be passed into the decoder in order to visualize the centroids in the original data space.

See for an example of how kmeans is performed and the centroids are retrieved during training.