This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add nas it * fix issue with nnictl and test nas first * change python2 to python3 * move test order
- Loading branch information
Showing
6 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
set -e | ||
CWD=${PWD} | ||
|
||
echo "" | ||
echo "===========================Testing: NAS===========================" | ||
EXAMPLE_DIR=${CWD}/../examples/nas | ||
|
||
echo "testing classic nas..." | ||
cd $EXAMPLE_DIR/classic_nas | ||
SEARCH_SPACE_JSON=nni_auto_gen_search_space.json | ||
if [ -f $SEARCH_SPACE_JSON ]; then | ||
rm $SEARCH_SPACE_JSON | ||
fi | ||
nnictl ss_gen -t "python3 mnist.py" | ||
if [ ! -f $SEARCH_SPACE_JSON ]; then | ||
echo "Search space file not found!" | ||
exit 1 | ||
fi | ||
|
||
echo "testing darts..." | ||
cd $EXAMPLE_DIR/darts | ||
python3 search.py --epochs 1 --channels 2 --layers 4 | ||
python3 retrain.py --arc-checkpoint ./checkpoints/epoch_0.json --layers 4 --epochs 1 | ||
|
||
echo "testing enas..." | ||
cd $EXAMPLE_DIR/enas | ||
python3 search.py --search-for macro --epochs 1 | ||
python3 search.py --search-for micro --epochs 1 | ||
|
||
echo "testing naive..." | ||
cd $EXAMPLE_DIR/naive | ||
python3 train.py | ||
|
||
echo "testing pdarts..." | ||
cd $EXAMPLE_DIR/pdarts | ||
python3 search.py --epochs 1 --channels 4 --nodes 2 --log-frequency 10 --add_layers 0 --add_layers 1 --dropped_ops 3 --dropped_ops 3 |