init
This commit is contained in:
12
scripts-rnn/README.md
Normal file
12
scripts-rnn/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Search RNN cell
|
||||
```
|
||||
bash scripts-nas-rnn/search-baseline.sh 3
|
||||
bash scripts-nas-rnn/search-accelerate.sh 0 200 10 1
|
||||
```
|
||||
|
||||
# Train the Searched Model
|
||||
```
|
||||
bash scripts-nas-rnn/train-PTB.sh 3 DARTS_V1
|
||||
bash scripts-nas-rnn/train-WT2.sh 3 DARTS_V1
|
||||
bash scripts-nas-rnn/train-PTB.sh 3 DARTS_V2
|
||||
```
|
26
scripts-rnn/search-accelerate.sh
Normal file
26
scripts-rnn/search-accelerate.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env sh
|
||||
if [ "$#" -ne 4 ] ;then
|
||||
echo "Input illegal number of parameters " $#
|
||||
echo "Need 4 parameters for the GPU and the epochs and tau-max and tau-min"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$TORCH_HOME" = "" ]; then
|
||||
echo "Must set TORCH_HOME envoriment variable for data dir saving"
|
||||
exit 1
|
||||
else
|
||||
echo "TORCH_HOME : $TORCH_HOME"
|
||||
fi
|
||||
|
||||
gpus=$1
|
||||
epoch=$2
|
||||
tau_max=$3
|
||||
tau_min=$4
|
||||
SAVED=./snapshots/NAS-RNN/Search-Accelerate-tau_${tau_max}_${tau_min}-${epoch}
|
||||
|
||||
CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/rnn/acc_rnn_search.py \
|
||||
--data_path ./data/data/penn \
|
||||
--save_path ${SAVED} \
|
||||
--epochs ${epoch} \
|
||||
--tau_max ${tau_max} --tau_min ${tau_min} \
|
||||
--config_path ./configs/NAS-PTB-BASE.config \
|
||||
--print_freq 200
|
23
scripts-rnn/search-baseline.sh
Normal file
23
scripts-rnn/search-baseline.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env sh
|
||||
if [ "$#" -ne 1 ] ;then
|
||||
echo "Input illegal number of parameters " $#
|
||||
echo "Need 1 parameters for the GPU"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$TORCH_HOME" = "" ]; then
|
||||
echo "Must set TORCH_HOME envoriment variable for data dir saving"
|
||||
exit 1
|
||||
else
|
||||
echo "TORCH_HOME : $TORCH_HOME"
|
||||
fi
|
||||
|
||||
gpus=$1
|
||||
epoch=50
|
||||
SAVED=./snapshots/NAS-RNN/Search-Baseline-${epoch}
|
||||
|
||||
CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/rnn/train_rnn_search.py \
|
||||
--data_path ./data/data/penn \
|
||||
--save_path ${SAVED} \
|
||||
--epochs ${epoch} \
|
||||
--config_path ./configs/NAS-PTB-BASE.config \
|
||||
--print_freq 200
|
22
scripts-rnn/train-PTB.sh
Normal file
22
scripts-rnn/train-PTB.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env sh
|
||||
if [ "$#" -ne 2 ] ;then
|
||||
echo "Input illegal number of parameters " $#
|
||||
echo "Need 2 parameters for the GPU and the architecture"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$TORCH_HOME" = "" ]; then
|
||||
echo "Must set TORCH_HOME envoriment variable for data dir saving"
|
||||
exit 1
|
||||
else
|
||||
echo "TORCH_HOME : $TORCH_HOME"
|
||||
fi
|
||||
|
||||
gpus=$1
|
||||
arch=$2
|
||||
SAVED=./snapshots/NAS-RNN/Search-${arch}-PTB
|
||||
|
||||
CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/rnn/train_rnn_base.py \
|
||||
--arch ${arch} \
|
||||
--save_path ${SAVED} \
|
||||
--config_path ./configs/NAS-PTB-BASE.config \
|
||||
--print_freq 200
|
22
scripts-rnn/train-WT2.sh
Normal file
22
scripts-rnn/train-WT2.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env sh
|
||||
if [ "$#" -ne 2 ] ;then
|
||||
echo "Input illegal number of parameters " $#
|
||||
echo "Need 2 parameters for the GPU and the architecture"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$TORCH_HOME" = "" ]; then
|
||||
echo "Must set TORCH_HOME envoriment variable for data dir saving"
|
||||
exit 1
|
||||
else
|
||||
echo "TORCH_HOME : $TORCH_HOME"
|
||||
fi
|
||||
|
||||
gpus=$1
|
||||
arch=$2
|
||||
SAVED=./snapshots/NAS-RNN/Search-${arch}-WT2
|
||||
|
||||
CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/rnn/train_rnn_base.py \
|
||||
--arch ${arch} \
|
||||
--save_path ${SAVED} \
|
||||
--config_path ./configs/NAS-WT2-BASE.config \
|
||||
--print_freq 300
|
Reference in New Issue
Block a user