Update README

This commit is contained in:
D-X-Y 2021-04-07 17:14:49 +08:00
parent dd0722c1b7
commit 5c7ef93471
3 changed files with 126 additions and 8 deletions

View File

@ -106,10 +106,10 @@ to download this repo with submodules.
If you find that this project helps your research, please consider citing the related paper:
```
@inproceedings{dong2021autohas,
title={{AutoHAS}: Efficient Hyperparameter and Architecture Search},
author={Dong, Xuanyi and Tan, Mingxing and Yu, Adams Wei and Peng, Daiyi and Gabrys, Bogdan and Le, Quoc V},
booktitle = {International Conference on Learning Representations (ICLR) Workshop on Neural Architecture Search},
year={2021}
title = {{AutoHAS}: Efficient Hyperparameter and Architecture Search},
author = {Dong, Xuanyi and Tan, Mingxing and Yu, Adams Wei and Peng, Daiyi and Gabrys, Bogdan and Le, Quoc V},
booktitle = {2nd Workshop on Neural Architecture Search at International Conference on Learning Representations (ICLR)},
year = {2021}
}
@article{dong2021nats,
title = {{NATS-Bench}: Benchmarking NAS Algorithms for Architecture Topology and Size},

View File

@ -99,10 +99,10 @@ Some methods use knowledge distillation (KD), which require pre-trained models.
如果您发现该项目对您的科研或工程有帮助,请考虑引用下列的某些文献:
```
@inproceedings{dong2021autohas,
title={{AutoHAS}: Efficient Hyperparameter and Architecture Search},
author={Dong, Xuanyi and Tan, Mingxing and Yu, Adams Wei and Peng, Daiyi and Gabrys, Bogdan and Le, Quoc V},
booktitle = {International Conference on Learning Representations (ICLR) Workshop on Neural Architecture Search},
year={2021}
title = {{AutoHAS}: Efficient Hyperparameter and Architecture Search},
author = {Dong, Xuanyi and Tan, Mingxing and Yu, Adams Wei and Peng, Daiyi and Gabrys, Bogdan and Le, Quoc V},
booktitle = {2nd Workshop on Neural Architecture Search at International Conference on Learning Representations (ICLR)},
year = {2021}
}
@article{dong2021nats,
title = {{NATS-Bench}: Benchmarking NAS Algorithms for Architecture Topology and Size},

View File

@ -0,0 +1,118 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"id": "german-madonna",
"metadata": {},
"outputs": [],
"source": [
"# Implementation for \"A Tutorial on Bayesian Optimization\"\n",
"import numpy as np\n",
"\n",
"def get_data():\n",
" return np.random.random(2) * 10\n",
"\n",
"def f(x):\n",
" return float(np.power((x[0] * 3 - x[1]), 3) - np.exp(x[1]) + np.power(x[0], 2))"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "broke-citizenship",
"metadata": {},
"outputs": [],
"source": [
"# Kernels typically have the property that points closer in the input space are more strongly correlated\n",
"# i.e., if |x1 - x2| < |x1 - x3|, then sigma(x1, x2) > sigma(x1, x3).\n",
"# the commonly used and simple kernel is the power exponential or Gaussian kernel:\n",
"def sigma0(x1, x2, alpha0=1, alpha=[1,1]):\n",
" \"\"\"alpha could be a vector\"\"\"\n",
" power = np.array(alpha, dtype=np.float32) * np.power(np.array(x1)-np.array(x2), 2)\n",
" return alpha0 * np.exp( -np.sum(power) )\n",
"\n",
"# the most common choice for the mean function is a constant value\n",
"def mu0(x, mu):\n",
" return mu"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "aerial-carnival",
"metadata": {},
"outputs": [],
"source": [
"K = 5\n",
"X = np.array([get_data() for i in range(K)])\n",
"mu = np.mean(X, axis=0)\n",
"mu0_over_K = [mu0(x, mu) for x in X]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "polished-discussion",
"metadata": {},
"outputs": [],
"source": [
"sigma0_over_KK = []\n",
"for i in range(K):\n",
" sigma0_over_KK.append(np.array([sigma0(X[i], X[j]) for j in range(K)]))\n",
"sigma0_over_KK = np.array(sigma0_over_KK)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "comic-jesus",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(20, 20)\n",
"1.1038803861344952e-06\n",
"1.1038803861344952e-06\n"
]
}
],
"source": [
"print(sigma0_over_KK.shape)\n",
"print(sigma0_over_KK[1][2])\n",
"print(sigma0_over_KK[2][1])"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "statistical-wrist",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}