Skip to content

Instantly share code, notes, and snippets.

@EXJUSTICE
Created November 19, 2018 02:04
Show Gist options
  • Save EXJUSTICE/aef67767c0680926c535398f24f984be to your computer and use it in GitHub Desktop.
Save EXJUSTICE/aef67767c0680926c535398f24f984be to your computer and use it in GitHub Desktop.
_conv_array=(1 2 3 4 5)
N_h_array=(1 2 3 4 5)
Atom_fea_len_array=(8 16 32 64 128 256)
H_fea_len_array=( 8 16 32 64 128 256 )
Optim_array=('SGD' 'Adam')
Batch_size_array=( 128 256 )
Loss_array=("MSELoss" "L1Loss")
read -p "Which GPU? " gpu
export CUDA_VISIBLE_DEVICES=$gpu
for i in {1..20}
do
n_conv=${N_conv_array[$((RANDOM%5))]}
n_h=${N_h_array[$((RANDOM%5))]}
atom_fea_len=${Atom_fea_len_array[$((RANDOM%6))]}
h_fea_len=${H_fea_len_array[$((RANDOM%6))]}
weight_decay=($(bc -l <<< "${RANDOM} / 32767"))
dropout=($(bc -l <<< "${RANDOM} / 32767"))
optim=${Optim_array[$((RANDOM%2))]}
batch_size=${Batch_size_array[$((RANDOM%2))]}
loss=${Loss_array[$((RANDOM%2))]}
momentum=($(bc -l <<< "${RANDOM} / 32767"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment