cleverhans-lab / cleverhans

An adversarial example library for constructing attacks, building defenses, and benchmarking both
MIT License
6.16k stars 1.39k forks source link

add CIFAR10 tutorial in PyTorch #1024

Open npapernot opened 5 years ago

jvmncs commented 5 years ago

I wrote something like this awhile back here. The underlying codebase is quite a bit different from cleverhans, but maybe some of that can be reused?

michaelshiyu commented 5 years ago

BTW, the current mnist_tutorial in #1028 is only a few edits away from a cifar10 tutorial. Just change torchvision.datasets.MNIST to torchvision.datasets.CIFAR10 and change the in_channel of the model from 1 to 3.

Or do we want a bigger/better network for this instead of the current LeNet-5 in the mnist_tutorial?

In any case, I can add this tutorial after #1028 has been merged. Thanks.

jvmncs commented 5 years ago

That would probably make more sense, although I'm not sure what having multiple tutorials with only a few lines' difference would accomplish for a new user. Perhaps there's functionality missing from the MNIST tutorial that would be useful to add?

michaelshiyu commented 5 years ago

Yes, I agree that these two tutorials would look similar. And I can't see how a cifar10 tutorial would be able to demonstrate any functionality missing from the existing mnist tutorial.

I think the original idea was to add a cifar10 tutorial but I added a mnist tutorial with my PR instead.

npapernot commented 5 years ago

Let's change the dataset from MNIST to CIFAR10 once the PR is merged. The idea was to first get an example for MNIST quickly to help contributors waiting on an API example. Afterwards, we'd like to move away from MNIST since it is usually not an interesting dataset to study adversarial examples on (except in some corner cases).