ain-soph / trojanzoo

TrojanZoo provides a universal pytorch platform to conduct security researches (especially backdoor attacks/defenses) of image classification in deep learning.

Home Page:https://ain-soph.github.io/trojanzoo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: Dataset not found or corrupted. You can use download=True to download it

ArshadIram opened this issue · comments

The project is downloaded successfully.

git clone https://github.com/ain-soph/trojanzoo
pip install -e trojanzoo

When I run this command:

python ./examples/train.py --color --verbose 1 --dataset cifar10 --model resnet18_comp --lr_scheduler --cutout --grad_clip 5.0 --save

I am getting this error message:

image

Why this import showing error:
import trojanvision
image

Please use --download to download the dataset.

For the import error, please check your linter message for more information.

Now I am getting SSL error:

image
File "C:\Users\irama\anaconda3\envs\security\lib\site-packages\torchvision\datasets\utils.py", line 94, in _get_redirect_url

how can I install torjanvision? Do I need to install seperately or this comes with torjanzoo ?

Please check your pytorch version to make sure it's up to date.
You only need to install once with pip install -e trojanzoo after using git clone

image
Here is my pytorch version.

The error is not in TrojanZoo package.

Please check if the following torchvision command could be normally executed to download CIFAR10 dataset:
torchvision.datasets.CIFAR10(root='./', train=True, download=True)

Btw, if you want to do any training-related thing on CPU, please only consider MNIST dataset. CIFAR10 will be relatively slow on CPU.

No I am getting this error now: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>

I just updated python and updated torch for this code.
It was working before for other projects.

torchvision.datasets.CIFAR10(root='./', train=True, download=True) is related to torchvision package and not relying on trojanzoo package. Maybe you can raise an issue in their repo.

I solved this issue. However, I am still getting an import error "import trojanvision"

You need to provide enough information for the import error.