Comments (2)
Thanks for such in-time reply.
Though some lines of the code need to be modified to adapt with the newest NAS-Bench-201 API, it solved my problem just right!
Great thanks and best wishes.
from aw_nas.
Hi, thanks for your attention on our work. I try to find this python script on my server, it seems like I use this script:
# -*- coding: utf-8 -*-
# pylint: disable-all
import pickle
import numpy as np
from aw_nas.common import get_search_space
from nas_201_api import NASBench201API as API
search_space = get_search_space("nasbench-201")
num_arch = len(search_space.api)
print("Number of arch data: {}".format(num_arch))
api = search_space.api
# valid_ratio = 0.1
valid_ratio = 0.5
num_valid = int(num_arch * valid_ratio)
train_data = []
for i in range(num_arch - num_valid):
# first use cifar10!
# all 200 epoch, epoch maybe use epoch 150 is better.. let's try
arch_res = api.query_by_index(i)
arch = API.str2matrix(arch_res.arch_str)
accs = [[res.eval_acc1es["ori-test@99"], res.eval_acc1es["ori-test@149"], res.eval_acc1es["ori-test@199"]] for res in arch_res.query("cifar10").values()]
test_accs = np.mean(accs, axis=0) / 100.
train_data.append((arch, test_accs[2], test_accs[1]))
valid_data = []
for i in range(num_arch - num_valid, num_arch):
# first use cifar10!
# all 200 epoch, epoch maybe use epoch 150 is better.. let's try
arch_res = api.query_by_index(i)
arch = API.str2matrix(arch_res.arch_str)
accs = [[res.eval_acc1es["ori-test@99"], res.eval_acc1es["ori-test@149"], res.eval_acc1es["ori-test@199"]] for res in arch_res.query("cifar10").values()]
test_accs = np.mean(accs, axis=0) / 100.
valid_data.append((arch, test_accs[2], test_accs[1]))
with open("nasbench201_05.pkl", "wb") as wf:
pickle.dump(train_data, wf)
with open("nasbench201_05_valid.pkl", "wb") as wf:
pickle.dump(valid_data, wf)
You'll need NAS-Bench-201 installed, and GATES uses the very first version of the NAS-Bench-201 repository (only this very first version is available at that time), the name of the data file is NAS-Bench-201-v1_0-e61699.pth
.
from aw_nas.
Related Issues (20)
- Hardware: Profiling Network Generation Problem
- About FTT-NAS GPU search problem... HOT 3
- I seem to found a small bug in your FTT-NAS project... HOT 4
- After you revised the project last time, I tried to run FTT-NAS search. It was normal at first, but after 10epochs were found, an error was reported when running the test() method... HOT 3
- ray_dispatcher
- ray version HOT 1
- Adversarial Supernet training HOT 5
- Similar DAG encoding scheme to an existing paper HOT 1
- Generate sample config error and FBNet support? HOT 1
- nasbench.api.OutOfDomainError: unsupported op none HOT 1
- The program is stuck in an endless loop, when run awnas search examples/nasbench/nasbench-101_gates_sa.yaml HOT 1
- How to tune each rollout and how to use the Pareto-based EA HOT 2
- In aw_nas/aw_nas/objective/zerocost.py, the module foresight cannot be imported. HOT 2
- How to change the environment variable “AWNAS_HOME“ HOT 2
- Question about the supernet training?
- question about supernet training.
- Code for TA-GATES HOT 3
- Regrading TA-GATES dataset HOT 1
- ENAS, NB301 dataset preprocessing code for TA-GATES HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aw_nas.