def get_indices(dataset, class_name):
    """Return indices of class_name in dataset."""
    indices = []
    for i in range(len(dataset.targets)):
        if dataset.targets[i] == class_name:
            indices.append(i)
    return indices