# How to get variance inside each cluster?

Hello! I have this code and I want to get the variance inside each cluster. Thanks for helping.

import torchvision.datasets as dsets
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.