Giter VIP home page Giter VIP logo

nares-eval's Introduction

NARes Evaluation

The Evaluation code of NARes

Preparation

  1. Put dataset (CIFAR-10, CIFAR-10-C) to datasets/:

    datasets
    ├── cifar10
    │   └── cifar-10-batches-py
    └── cifar10c
    
  2. Put model weights and config file to models_home/:

    models_home
    └── arch_170
        ├── arch_170.yaml
        └── checkpoints
            └── arch_170_best.pth
    
  3. Install packages from requirements.txt

Attack Robustness Evaluation

model=arch_2333

#Base Linf
python ./eval.py --model-path ./models_home --log-path ./attack_log --load-best-model --model ${model} --seed 0

#Base L2
python ./eval.py --model-path ./models_home --log-path ./attack_log --load-best-model --model ${model} --seed 0 --norm L2

#AA-Linf
python ./eval.py --model-path ./models_home --log-path ./attack_log --load-best-model --model ${model} --seed 0 --attack-choice AA --aa-type Compact

#AA-L2
python ./eval.py --model-path ./models_home --log-path ./attack_log --load-best-model --model ${model} --seed 0 --attack-choice AA --aa-type Compact --norm L2

Evalute models by a text file with arch_id list:

# run on GPU0 with Base-Linf and seed 42
./run.sh 0 arch_list.txt base Linf 42

# run on GPU3 with AA-Linf and seed 22
./run.sh 3 arch_list.txt aa Linf 22

Corruption Robustness Evaluation

python ./eval_corruption_level.py --model-path ./models_home --log-path ./attack_log --load-best-model --model arch_2333

Acknowledgement

nares-eval's People

Contributors

zaberko avatar shihuahuang95 avatar

Watchers

 avatar

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.