GithubHelp home page GithubHelp logo

sheepqiaochu / tenas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vita-group/tenas

0.0 0.0 0.0 285 KB

[ICLR 2021] "Neural Architecture Search on ImageNet in Four GPU Hours: A Theoretically Inspired Perspective" by Wuyang Chen, Xinyu Gong, Zhangyang Wang

License: MIT License

Python 100.00%

tenas's Introduction

Changed block

1.Dataloader

  • Load state_dict of UAP generator and generate UAP.
  • Add UAPS to origin pictures and return x and $x^\prime$

2.Calculate NTK score

  • Calculate NTK score for both x and $x^\prime$
  • Calculate weighted sum of NTK(x) and NTK$\left(x^\prime\right)$

Usage

0. Prepare the dataset

  • Please follow the guideline here to prepare the CIFAR-10/100 and ImageNet dataset, and also the NAS-Bench-201 database.
  • Remember to properly set the TORCH_HOME and data_paths in the prune_launch.py.

1. Search

python prune_launch.py --space nas-bench-201 --dataset cifar10 --UAP_inf cifar10_resnet56 --gpu 0
python prune_launch.py --space nas-bench-201 --dataset cifar100 --UAP_info cifar100_resnet56--gpu 0
python prune_launch.py --space nas-bench-201 --dataset ImageNet16-120 --UAP_info 32 --gpu 0
python prune_launch.py --space nas-bench-201 --dataset imagenet-1k --UAP_info 32resnet152 --gpu 0
python prune_launch.py --space darts --dataset cifar10 --gpu 0
python prune_launch.py --space darts --dataset imagenet-1k --gpu 0

2. Evaluation

  • For architectures searched on nas-bench-201, the accuracies are immediately available at the end of search (from the console output).
  • For architectures searched on darts, please use DARTS_evaluation for training the searched architecture from scratch and evaluation.

tenas's People

Contributors

sheepqiaochu avatar chenwydj 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.