The fit() methods expects a numpy array of the complete dataset, so you would need to get all samples of the DataLoader before feeding them to KMeans().fit().
You could use MiniBatchKMeans 41 and use the partial_fit method, if you want to feed each batch to it.