def get_sorted_neuron_indices()

in neuron-explainer/neuron_explainer/activations/activations.py [0:0]


def get_sorted_neuron_indices(dataset_path: str, layer_index: Union[str, int]) -> List[int]:
    """Returns the indices of all neurons in this layer, in ascending order."""
    layer_dir = bf.join(dataset_path, "neurons", str(layer_index))
    return sorted(
        [int(f.split(".")[0]) for f in bf.listdir(layer_dir) if f.split(".")[0].isnumeric()]
    )