Solved by ptrblck in post #2 
              
              
                This doesn’t seem to be PyTorch-specific, as you are using sklearn. 
You could probably use the labels_ to get all samples for the clusters and then calculate the variance between these samples.