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
432286c1
Commit
432286c1
authored
3 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Instanciate correct number of output fields.
parent
3aaf11cd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
climax/main/downscale_train.py
+4
-4
4 additions, 4 deletions
climax/main/downscale_train.py
climax/main/downscale_train_season.py
+4
-4
4 additions, 4 deletions
climax/main/downscale_train_season.py
with
8 additions
and
8 deletions
climax/main/downscale_train.py
+
4
−
4
View file @
432286c1
...
@@ -22,7 +22,7 @@ from pysegcnn.core.trainer import NetworkTrainer, LogConfig
...
@@ -22,7 +22,7 @@ from pysegcnn.core.trainer import NetworkTrainer, LogConfig
from
pysegcnn.core.models
import
Network
from
pysegcnn.core.models
import
Network
from
pysegcnn.core.logging
import
log_conf
from
pysegcnn.core.logging
import
log_conf
from
climax.core.dataset
import
ERA5Dataset
,
NetCDFDataset
from
climax.core.dataset
import
ERA5Dataset
,
NetCDFDataset
from
climax.core.loss
import
BernoulliGammaLoss
,
BernoulliGenPareto
Loss
from
climax.core.loss
import
MSELoss
,
L1
Loss
from
climax.main.config
import
(
ERA5_PLEVELS
,
ERA5_PREDICTORS
,
PREDICTAND
,
from
climax.main.config
import
(
ERA5_PLEVELS
,
ERA5_PREDICTORS
,
PREDICTAND
,
CALIB_PERIOD
,
DOY
,
SHUFFLE
,
BATCH_SIZE
,
LR
,
CALIB_PERIOD
,
DOY
,
SHUFFLE
,
BATCH_SIZE
,
LR
,
LAMBDA
,
NORM
,
TRAIN_CONFIG
,
NET
,
LOSS
,
FILTERS
,
LAMBDA
,
NORM
,
TRAIN_CONFIG
,
NET
,
LOSS
,
FILTERS
,
...
@@ -110,9 +110,9 @@ if __name__ == '__main__':
...
@@ -110,9 +110,9 @@ if __name__ == '__main__':
# define number of output fields
# define number of output fields
# check whether modelling pr with probabilistic approach
# check whether modelling pr with probabilistic approach
outputs
=
len
(
Obs_ds
.
data_vars
)
outputs
=
len
(
Obs_ds
.
data_vars
)
if
PREDICTAND
==
'
pr
'
and
(
isinstance
(
LOSS
,
BernoulliGammaLoss
)
or
if
PREDICTAND
==
'
pr
'
:
isinstance
(
LOSS
,
BernoulliGenPareto
Loss
))
:
outputs
=
(
1
if
(
isinstance
(
LOSS
,
MSELoss
)
or
isinstance
(
LOSS
,
L1
Loss
))
outputs
=
3
else
3
)
# instanciate network
# instanciate network
inputs
=
len
(
Era5_ds
.
data_vars
)
+
2
if
DOY
else
len
(
Era5_ds
.
data_vars
)
inputs
=
len
(
Era5_ds
.
data_vars
)
+
2
if
DOY
else
len
(
Era5_ds
.
data_vars
)
...
...
This diff is collapsed.
Click to expand it.
climax/main/downscale_train_season.py
+
4
−
4
View file @
432286c1
...
@@ -22,7 +22,7 @@ from pysegcnn.core.trainer import NetworkTrainer, LogConfig
...
@@ -22,7 +22,7 @@ from pysegcnn.core.trainer import NetworkTrainer, LogConfig
from
pysegcnn.core.models
import
Network
from
pysegcnn.core.models
import
Network
from
pysegcnn.core.logging
import
log_conf
from
pysegcnn.core.logging
import
log_conf
from
climax.core.dataset
import
ERA5Dataset
,
NetCDFDataset
from
climax.core.dataset
import
ERA5Dataset
,
NetCDFDataset
from
climax.core.loss
import
BernoulliGammaLoss
,
BernoulliGenPareto
Loss
from
climax.core.loss
import
MSELoss
,
L1
Loss
from
climax.main.config
import
(
ERA5_PLEVELS
,
ERA5_PREDICTORS
,
PREDICTAND
,
from
climax.main.config
import
(
ERA5_PLEVELS
,
ERA5_PREDICTORS
,
PREDICTAND
,
CALIB_PERIOD
,
DOY
,
SHUFFLE
,
BATCH_SIZE
,
LR
,
CALIB_PERIOD
,
DOY
,
SHUFFLE
,
BATCH_SIZE
,
LR
,
LAMBDA
,
NORM
,
TRAIN_CONFIG
,
NET
,
LOSS
,
FILTERS
,
LAMBDA
,
NORM
,
TRAIN_CONFIG
,
NET
,
LOSS
,
FILTERS
,
...
@@ -161,9 +161,9 @@ if __name__ == '__main__':
...
@@ -161,9 +161,9 @@ if __name__ == '__main__':
# define number of output fields
# define number of output fields
# check whether modelling pr with probabilistic approach
# check whether modelling pr with probabilistic approach
outputs
=
len
(
Obs_train
.
data_vars
)
outputs
=
len
(
Obs_train
.
data_vars
)
if
PREDICTAND
==
'
pr
'
and
(
isinstance
(
LOSS
,
BernoulliGammaLoss
)
or
if
PREDICTAND
==
'
pr
'
:
isinstance
(
LOSS
,
BernoulliGenPareto
Loss
)
):
outputs
=
(
1
if
(
isinstance
(
LOSS
,
MSE
Loss
)
or
outputs
=
3
isinstance
(
LOSS
,
L1Loss
))
else
3
)
# instanciate network
# instanciate network
inputs
=
(
len
(
Era5_train
.
data_vars
)
+
2
if
DOY
else
inputs
=
(
len
(
Era5_train
.
data_vars
)
+
2
if
DOY
else
...
...
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