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
a8daa1b7
Commit
a8daa1b7
authored
3 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Updated state file name.
parent
74f2f0a5
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
climax/main/downscale_infer.py
+14
-1
14 additions, 1 deletion
climax/main/downscale_infer.py
with
14 additions
and
1 deletion
climax/main/downscale_infer.py
+
14
−
1
View file @
a8daa1b7
...
...
@@ -21,9 +21,10 @@ from pysegcnn.core.utils import search_files
from
climax.core.dataset
import
ERA5Dataset
from
climax.core.predict
import
predict_ERA5
from
climax.core.utils
import
split_date_range
from
climax.core.loss
import
BernoulliGammaLoss
from
climax.main.config
import
(
ERA5_PREDICTORS
,
ERA5_PLEVELS
,
PREDICTAND
,
NET
,
VALID_PERIOD
,
BATCH_SIZE
,
NORM
,
DOY
,
NYEARS
,
DEM
,
DEM_FEATURES
)
DEM
,
DEM_FEATURES
,
LOSS
)
from
climax.main.io
import
ERA5_PATH
,
DEM_PATH
,
MODEL_PATH
,
TARGET_PATH
# module level logger
...
...
@@ -39,6 +40,18 @@ if __name__ == '__main__':
state_file
=
ERA5Dataset
.
state_file
(
NET
,
PREDICTAND
,
ERA5_PREDICTORS
,
ERA5_PLEVELS
,
dem
=
DEM
,
dem_features
=
DEM_FEATURES
,
doy
=
DOY
)
# adjust statefile name for precipitation
if
PREDICTAND
==
'
pr
'
:
if
isinstance
(
LOSS
,
BernoulliGammaLoss
):
state_file
=
state_file
.
replace
(
'
.pt
'
,
'
_{}mm_{}.pt
'
.
format
(
str
(
LOSS
.
min_amount
).
replace
(
'
.
'
,
''
),
repr
(
LOSS
).
strip
(
'
()
'
)))
else
:
state_file
=
state_file
.
replace
(
'
.pt
'
,
'
{}.pt
'
.
format
(
repr
(
LOSS
).
strip
(
'
()
'
)))
# path to model state
state_file
=
MODEL_PATH
.
joinpath
(
state_file
)
# initialize logging
...
...
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