NAS-HPO-Bench-II is the first benchmark dataset for joint optimization of CNN and training HPs.

Overview

NAS-HPO-Bench-II API

Overview

NAS-HPO-Bench-II is the first benchmark dataset for joint optimization of CNN and training HPs.

It helps

  • a fair and low-cost evaluation/comparison of joint optimization (NAS+HPO) methods
  • a detailed analysis of the relationship between architecture/training HPs and performances

Our experimental analysis supports the importance of joint optimization. Please see our paper for details.

This repo provides API for NAS-HPO-Bench-II to make benchmarking easy. You can query our data when evaluating models in the search process of AutoML methods instead of training the models at a high cost.

If you use the dataset, please cite:

@InProceedings{hirose2021bench,
  title={{NAS-HPO-Bench-II}: A Benchmark Dataset on Joint Optimization of Convolutional Neural Network Architecture and Training Hyperparameters},
  author={Hirose, Yoichi and Yoshinari, Nozomu and Shirakawa,  Shinichi},
  booktitle={Proceedings of the 13th Asian Conference on Machine Learning},
  year={2021}
}

The code for training models is here.

Dataset Overview

The total size of the search space is 192K. The dataset includes

  • the exact data of all the models in the search space for 12 epoch training
  • the surrogate data predicting accuracies after 200 epoch training

Architecture Search Space

The overall CNN architecture is constructed by stacking cells represented as a directed acyclic graph (DAG). Each edge in the graph indicates one of the four operations.

  • 3x3 convolution (ReLU activation, 3x3 convolution with stride 1, then batch normalization)
  • 3x3 average pooling with stride 1
  • Skip, which outputs the input tensor
  • Zero, which outputs the zero tensor with the same dimension as the input

It is based on NAS-Bench-201 and the only difference is that we exclude the 1x1 convolution operation from the options.

Training HP Search Space

The combination of eight initial learning rates and six batch sizes are used.

Hyperparameter Options
Batch Size 16, 32, 64, 128, 256, 512
Learning Rate 0.003125, 0.00625, 0.0125, 0.025, 0.05, 0.1, 0.2, 0.4

Installation

Run

pip install nashpobench2api

, and download the API dataset from Google Drive (93.7MB), then put the data in some directory (default: ./data). This API supports python >= 3.6 (and no external library dependencies).

If you want to run the codes in bench_algos, run pip install -r requirements.txt.

Getting Started

Create an API instance to get access to the dataset.

from nashpobench2api import NASHPOBench2API as API
api = API('/path/to/dataset')

You can get 12-epoch valid accuracy (%) and train+valid training cost (sec.) of the specified configuration.

acc, cost = api.query_by_key(
	cellcode='0|10|210',
	batch_size=256,
	lr=0.1 )

Here, cellcode represents one of the architectures in the search space. As shown in the figure below, the numbers in the cellcode mean the type of operations, and the position of the numbers shows the edge '(A) | (B)(C) | (D)(E)(F)'.

In the querying process, the api instance remembers and shows the log (what you have queried). You can reduce the log if set verbose=False when initializing api.

When the querying process has finished, you can get the test accuracy of the configuration with the best valid accuracy in the queried configurations.

results = api.get_results()

results is a dictionary with the keys below.

Key Explanation
acc_trans a transition of valid accuracies api have queried
key_trans a transition of keys (=cellcode, lr, batch_size) api have queried
best_acc_trans a transition of the best valid accuracies (%) api have queried
best_key_trans a transition of the best keys (=cellcode, lr, batch_size) api have queried
total_cost_trans a transition of train+valid costs (sec.)
final_accs 12-epoch and 200-epoch test accuracies (%) of the key with the best valid accuracy api have queried

You can reset what api have remebered, which is useful when multiple runs.

api.reset_log_data()

The examples of benchmarking codes are in the bench_algos directory. Especially, random_search.py is the simplest code and easy to understand (the core part is random_search()).

Work in Progress

  • Upload the dataset as DataFrame for visualization/analysis.
  • Upload codes for a surrogate model.
  • Upload the trained models.
Owner
yoichi hirose
yoichi hirose
Data Preparation, Processing, and Visualization for MoVi Data

MoVi-Toolbox Data Preparation, Processing, and Visualization for MoVi Data, https://www.biomotionlab.ca/movi/ MoVi is a large multipurpose dataset of

Saeed Ghorbani 51 Nov 27, 2022
Code for the paper "PortraitNet: Real-time portrait segmentation network for mobile device" @ CAD&Graphics2019

PortraitNet Code for the paper "PortraitNet: Real-time portrait segmentation network for mobile device". @ CAD&Graphics 2019 Introduction We propose a

265 Dec 01, 2022
City Surfaces: City-scale Semantic Segmentation of Sidewalk Surfaces

City Surfaces: City-scale Semantic Segmentation of Sidewalk Surfaces Paper Temporary GitHub page for City Surfaces paper. More soon! While designing s

14 Nov 10, 2022
Simple-Neural-Network From Scratch in Python

Simple-Neural-Network From Scratch in Python This is a simple Neural Network created without any Machine Learning Libraries. The only dependencies are

Aum Shah 1 Dec 28, 2021
This repository contains the code needed to train Mega-NeRF models and generate the sparse voxel octrees

Mega-NeRF This repository contains the code needed to train Mega-NeRF models and generate the sparse voxel octrees used by the Mega-NeRF-Dynamic viewe

cmusatyalab 260 Dec 28, 2022
Repository for MDPGT

MD-PGT Repository for implementing and reproducing the results for the paper MDPGT: Momentum-based Decentralized Policy Gradient Tracking. Available E

Xian Yeow Lee 2 Dec 30, 2021
A Repository of Community-Driven Natural Instructions

A Repository of Community-Driven Natural Instructions TLDR; this repository maintains a community effort to create a large collection of tasks and the

AI2 244 Jan 04, 2023
Pytorch implementation for "Distribution-Balanced Loss for Multi-Label Classification in Long-Tailed Datasets" (ECCV 2020 Spotlight)

Distribution-Balanced Loss [Paper] The implementation of our paper Distribution-Balanced Loss for Multi-Label Classification in Long-Tailed Datasets (

Tong WU 304 Dec 22, 2022
Official Implementation of 'UPDeT: Universal Multi-agent Reinforcement Learning via Policy Decoupling with Transformers' ICLR 2021(spotlight)

UPDeT Official Implementation of UPDeT: Universal Multi-agent Reinforcement Learning via Policy Decoupling with Transformers (ICLR 2021 spotlight) The

hhhusiyi 96 Dec 22, 2022
Monify: an Expense tracker Program implemented in a Graphical User Interface that allows users to keep track of their expenses

💳 MONIFY (EXPENSE TRACKER PRO) 💳 Description Monify is an Expense tracker Program implemented in a Graphical User Interface allows users to add inco

Moyosore Weke 1 Dec 14, 2021
[ECCV2020] Content-Consistent Matching for Domain Adaptive Semantic Segmentation

[ECCV20] Content-Consistent Matching for Domain Adaptive Semantic Segmentation This is a PyTorch implementation of CCM. News: GTA-4K list is available

Guangrui Li 88 Aug 25, 2022
You Only 👀 One Sequence

You Only 👀 One Sequence TL;DR: We study the transferability of the vanilla ViT pre-trained on mid-sized ImageNet-1k to the more challenging COCO obje

Hust Visual Learning Team 666 Jan 03, 2023
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting (RVM) English | 中文 Official repository for the paper Robust High-Resolution Video Matting with Temporal Guidance. RVM is specific

flow-dev 2 Aug 21, 2022
Software for Multimodalty 2D+3D Facial Expression Recognition (FER) UI

EmotionUI Software for Multimodalty 2D+3D Facial Expression Recognition (FER) UI. demo screenshot (with RealSense) required packages Python = 3.6 num

Yang Jiao 2 Dec 23, 2021
PyTorch implementation of DD3D: Is Pseudo-Lidar needed for Monocular 3D Object detection?

PyTorch implementation of DD3D: Is Pseudo-Lidar needed for Monocular 3D Object detection? (ICCV 2021), Dennis Park*, Rares Ambrus*, Vitor Guizilini, Jie Li, and Adrien Gaidon.

Toyota Research Institute - Machine Learning 364 Dec 27, 2022
From the basics to slightly more interesting applications of Tensorflow

TensorFlow Tutorials You can find python source code under the python directory, and associated notebooks under notebooks. Source code Description 1 b

Parag K Mital 5.6k Jan 09, 2023
A simple, unofficial implementation of MAE using pytorch-lightning

Masked Autoencoders in PyTorch A simple, unofficial implementation of MAE (Masked Autoencoders are Scalable Vision Learners) using pytorch-lightning.

Connor Anderson 20 Dec 03, 2022
This game was designed to encourage young people not to gamble on lotteries, as the probablity of correctly guessing the number is infinitesimal!

Lottery Simulator 2022 for Web Launch Application Developed by John Seong in Ontario. This game was designed to encourage young people not to gamble o

John Seong 2 Sep 02, 2022
Ἀνατομή is a PyTorch library to analyze representation of neural networks

Ἀνατομή is a PyTorch library to analyze representation of neural networks

Ryuichiro Hataya 50 Dec 05, 2022
SPCL: A New Framework for Domain Adaptive Semantic Segmentation via Semantic Prototype-based Contrastive Learning

SPCL SPCL: A New Framework for Domain Adaptive Semantic Segmentation via Semantic Prototype-based Contrastive Learning Update on 2021/11/25: ArXiv Ver

Binhui Xie (谢斌辉) 11 Oct 29, 2022