Skip to content
Snippets Groups Projects
Commit be0a7d6e authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Script to tune learning rate.

parent e8ac06a0
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
# activate conda environment
conda activate climax
......@@ -22,9 +24,9 @@ for loss in ${LOSS[@]}; do
# change loss function in configuration
if [ "$loss" = "L1Loss" ] || [ "$loss" = "MSELoss" ]; then
sed -i "s/LOSS\s*=.*/LOSS=$loss()/" ./climax/main/config.py
sed -i "s/LOSS\s*=.*/LOSS=$loss()/" ./climax/main/config.py
else
sed -i "s/LOSS\s*=.*/LOSS=$loss(min_amount=1)/" ./climax/main/config.py
sed -i "s/LOSS\s*=.*/LOSS=$loss(min_amount=1)/" ./climax/main/config.py
fi
# iterate over weight decay values
......
#!/usr/bin/env bash
# activate conda environment
conda activate climax
# move to project repository
cd ~/git/climax
# loss functions
LOSS=(L1Loss BernoulliGammaLoss BernoulliWeibullLoss MSELoss)
# iterate over loss functions
for loss in ${LOSS[@]}; do
# change loss function in configuration
if [ "$loss" = "L1Loss" ] || [ "$loss" = "MSELoss" ]; then
sed -i "s/LOSS\s*=.*/LOSS=$loss()/" ./climax/main/config.py
else
sed -i "s/LOSS\s*=.*/LOSS=$loss(min_amount=1)/" ./climax/main/config.py
fi
# run learning rate range test
python climax/main/lr_range_test.py
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment