You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,9 @@ implementation is written in TensorFlow, and this projects contains
5
5
some files from the original repository (in the directory
6
6
`nasbench_pytorch/model/`).
7
7
8
+
**Important:** if you want to reproduce the original results, please refer to the
9
+
[Reproducibility](#repro) section.
10
+
8
11
# Overview
9
12
A PyTorch implementation of *training* of NAS-Bench-101 dataset: [NAS-Bench-101: Towards Reproducible Neural Architecture Search](https://arxiv.org/abs/1902.09635).
10
13
The dataset contains 423,624 unique neural networks exhaustively generated and evaluated from a fixed graph-based search space.
@@ -64,13 +67,25 @@ Then, you can train it just like the example network in `main.py`.
64
67
Example architecture (picture from the original repository)
65
68

66
69
70
+
# Reproducibility <aid="repro"></a>
71
+
The code should closely match the TensorFlow version (including the hyperparameters), but there are some differences:
72
+
- RMSProp implementation in TensorFlow and PyTorch is **different**
73
+
- For more information refer to [here](https://github.com/pytorch/pytorch/issues/32545) and [here](https://github.com/pytorch/pytorch/issues/23796).
74
+
- Optionally, you can install pytorch-image-models where a [TensorFlow-like RMSProp](https://github.com/rwightman/pytorch-image-models/blob/main/timm/optim/rmsprop_tf.py#L5) is implemented
75
+
-`pip install timm`
76
+
- Then, pass `--optimizer rmsprop_tf` to `main.py` to use it
77
+
78
+
79
+
- The original training was on TPUs, this code enables only GPU and CPU training
80
+
- Input data augmentation methods are the same, but due to randomness they are not applied in the same manner
81
+
- Cause: Batches and images cannot be shuffled as in the original TPU training, and the augmentation seed is also different
82
+
- Results may still differ due to TensorFlow/PyTorch implementation differences
83
+
84
+
Refer to this [issue](https://github.com/romulus0914/NASBench-PyTorch/issues/6) for more information and for comparison with API results.
85
+
67
86
# Disclaimer
68
87
Modified from [NASBench: A Neural Architecture Search Dataset and Benchmark](https://github.com/google-research/nasbench).
69
88
*graph_util.py* and *model_spec.py* are directly copied from the original repo. Original license can be found [here](https://github.com/google-research/nasbench/blob/master/LICENSE).
70
89
71
90
<aid="note"></a>
72
91
**Please note that this repo is only used to train one possible architecture in the search space, not to generate all possible graphs and train them.
73
-
74
-
**Important information:** The code should closely match the TensorFlow version, but
75
-
you may still get slightly different results due to differences in TensorFlow/PyTorch implementation.
76
-
Moreover, input data augmentation is the same, but due to randomness isn't exactly the same.
0 commit comments