Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climax
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
earth_observation_public
Climax
Commits
b9cda066
Commit
b9cda066
authored
3 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Iterate over predictands.
parent
fcc5bc7f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Scripts/lr_range_test.sh
+24
-10
24 additions, 10 deletions
Scripts/lr_range_test.sh
with
24 additions
and
10 deletions
Scripts/lr_range_test.sh
+
24
−
10
View file @
b9cda066
...
...
@@ -6,19 +6,33 @@ conda activate climax
# move to project repository
cd
~/git/climax
#
loss function
s
LOSS
=(
L1Loss BernoulliGammaLoss BernoulliWeibullLoss MSELoss
)
#
predictand
s
PREDICTAND
=(
pr
tasmin tasmax
)
# iterate over
loss function
s
for
loss
in
${
LOSS
[@]
}
;
do
# iterate over
predictand
s
for
predictand
in
${
PREDICTAND
[@]
}
;
do
# change loss function in configuration
if
[
"
$loss
"
=
"L1Loss"
]
||
[
"
$loss
"
=
"MSELoss"
]
;
then
sed
-i
"s/LOSS
\s
*=.*/LOSS=
$loss
()/"
./climax/main/config.py
# change predictand in configuration
sed
-i
"s/PREDICTAND
\s
*=.*/PREDICTAND='
$predictand
'/"
./climax/main/config.py
# define available loss functions for current predictand
if
[
"
$predictand
"
=
"pr"
]
;
then
LOSS
=(
L1Loss BernoulliGammaLoss BernoulliWeibullLoss MSELoss
)
else
sed
-i
"s/LOSS
\s
*=.*/LOSS=
$loss
(min_amount=1)/"
./climax/main/config.py
LOSS
=(
L1Loss MSELoss
)
fi
# run learning rate range test
python climax/main/lr_range_test.py
# 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
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment