Coder Social home page Coder Social logo

freeadversarialtraining's People

Contributors

ashafahi avatar mahyarnajibi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeadversarialtraining's Issues

Well, is there anyone run it with cifar100?

this question is about train_fgsm.py
I modified function "get_loaders" and net's num_classes to let program can run with cifar100. But pgd acc is only 3%. And it's normal with cifar10.

The modified part is as follows:
(1)net
image

(2) get_loaders
image

Has anyone encountered the same problem as me?

Memory leak

I am facing memory leak issue due to the gradient calculation of the noise_batch tensor. Is there any specific PyTorch version required to avoid this issue?

About Free-8 experiments settings for WideResNet34-10 on CIFAR10 with PyTorch

Hi, your work is great! I have tried to run Free-8 with WideResNet34-10 on CIFAR10 using PyTorch.
My experiment settings: m=8, clip_epsilon=8.0 and fgsm_step=2.0. I trained 240 epochs. Initial learning rate is 0.1 and learning rate decays 10 times at 100//8 epoch and 150//8 epoch. SGD optimizer, momentum 0.9 and weight_decay 2e-4. And I set torch.backends.cudnn.benchmark = False and torch.backends.cudnn.deterministic = True.
The experiment results: clean validation accuracy is about 88.5, but adversarial validation accuracy is only about 43. Is there something wrong with my settings? Could you please provide more detail information?

modified to train on CIFAR-10/100

Hi,

Thank you for providing the code. I modified the code a little by only changing the dataset/dataloader to CIFAR-10 and network architecture to WideResNet32-10/ResNet-50 to reproduce the free adversarial training results on CIFAR-10. Unfortunately, I failed to get the expected results. The top1 test accuracy of natural images and the top1 accuracy againt PGD attacks are far away from that the article reported, less than 20% and 10% respectively.

Here is the modified code and the training logs are attached.
resnet50_log.txt
WRN_32_10_log.txt

Multi-gpus

Thanks for your great work.
I notice the training script mainfree.py does not support multi-gpus training, however the TensorFlow version does.

Is there any technical issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.