Instructions for Running the Code

The provided Python notebook and script implements the methodology presented in Batch Pruning by Activation Stability (B-PAS). It includes experiments on the CIFAR-10, CIFAR-100, SVHN, and ImageNet datasets using various models.

To run the notebook (CIFAR-10, CIFAR-100, SVHN):

    1. Ensure that a CUDA-enabled GPU is properly configured on your system.

    2. Install all required dependencies by running the following command:

        'pip install -r requirements.txt'

    3. Update the dataset paths in the code according to your system.

    4. Execute each code cell sequentially. Each cell corresponds to a specific dataset and model configuration, allowing you to reproduce the results.
    5. Change dataset (CIFAR-10 to CIFAR-100 or SVHN), hyperparameters, threshold values as needed.

To run the script (ImageNet):
    1. Adjust the data path
    2. Run it in a distributed multi GPU cluster using: torchrun --nproc_per_node=[num of gpus in the node] B-PAS_ImageNet.py
