- Python Version: 3.11.5
- Libraries:
- PyTorch 2.3.0
- Torchvision 0.18.0
-
Install Python: Ensure you have Python 3.11.5 installed. If not, download it from the official Python website.
-
Install Libraries: Install the required Python libraries using the following command:
pip install torch==2.3.0 torchvision==0.18.0
Download the following pre-trained models and place them in the /code/model/ directory:
Download the ImageNet dataset from the following Kaggle link:
To run SeRI, use the following command structure. 'norm' is the base attacker such as CGBA and ADBA; budget and budget2 are base attacker budget and SeRI budget.
python main.py --dataset=mnist-cnn --targeted=0 --norm=CGBA --zip=SeRI --budget=800 --budget2=200 --epsilon=1.0 --early=0 --beginIMG=0 --imgnum=10 --remember=1