Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
esde
machine-learning
MLAir
Commits
91feab0c
Commit
91feab0c
authored
4 years ago
by
leufen1
Browse files
Options
Downloads
Patches
Plain Diff
MyLittleModel consists now only on Dense layers, included bug fix /close
#169
parent
ed0ae581
No related branches found
No related tags found
4 merge requests
!146
Develop
,
!145
Resolve "new release v0.12.0"
,
!141
refac simplify mylittlemodel
,
!138
Resolve "Advanced Documentation"
Pipeline
#45965
passed
4 years ago
Stage: test
Stage: docs
Stage: pages
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mlair/model_modules/model_class.py
+3
-9
3 additions, 9 deletions
mlair/model_modules/model_class.py
mlair/run_modules/post_processing.py
+4
-8
4 additions, 8 deletions
mlair/run_modules/post_processing.py
with
7 additions
and
17 deletions
mlair/model_modules/model_class.py
+
3
−
9
View file @
91feab0c
...
...
@@ -351,9 +351,8 @@ class AbstractModelClass(ABC):
class
MyLittleModel
(
AbstractModelClass
):
"""
A customised model with a 1x1 Conv, and 4 Dense layers (64, 32, 16, window_lead_time), where the last layer is the
output layer depending on the window_lead_time parameter. Dropout is used between the Convolution and the first
Dense layer.
A customised model 4 Dense layers (64, 32, 16, window_lead_time), where the last layer is the output layer depending
on the window_lead_time parameter.
"""
def
__init__
(
self
,
shape_inputs
:
list
,
shape_outputs
:
list
):
...
...
@@ -382,13 +381,8 @@ class MyLittleModel(AbstractModelClass):
"""
Build the model.
"""
# add 1 to window_size to include current time step t0
x_input
=
keras
.
layers
.
Input
(
shape
=
self
.
shape_inputs
)
x_in
=
keras
.
layers
.
Conv2D
(
32
,
(
1
,
1
),
padding
=
'
same
'
,
name
=
'
{}_Conv_1x1
'
.
format
(
"
major
"
))(
x_input
)
x_in
=
self
.
activation
(
name
=
'
{}_conv_act
'
.
format
(
"
major
"
))(
x_in
)
x_in
=
keras
.
layers
.
Flatten
(
name
=
'
{}
'
.
format
(
"
major
"
))(
x_in
)
x_in
=
keras
.
layers
.
Dropout
(
self
.
dropout_rate
,
name
=
'
{}_Dropout_1
'
.
format
(
"
major
"
))(
x_in
)
x_in
=
keras
.
layers
.
Flatten
(
name
=
'
{}
'
.
format
(
"
major
"
))(
x_input
)
x_in
=
keras
.
layers
.
Dense
(
64
,
name
=
'
{}_Dense_64
'
.
format
(
"
major
"
))(
x_in
)
x_in
=
self
.
activation
()(
x_in
)
x_in
=
keras
.
layers
.
Dense
(
32
,
name
=
'
{}_Dense_32
'
.
format
(
"
major
"
))(
x_in
)
...
...
This diff is collapsed.
Click to expand it.
mlair/run_modules/post_processing.py
+
4
−
8
View file @
91feab0c
...
...
@@ -81,16 +81,12 @@ class PostProcessing(RunEnvironment):
def
_run
(
self
):
# ols model
with
TimeTracking
():
self
.
train_ols_model
()
logging
.
info
(
"
take a look on the next reported time measure. If this increases a lot, one should think to
"
"
skip train_ols_model() whenever it is possible to save time.
"
)
# forecasts
with
TimeTracking
():
self
.
make_prediction
()
logging
.
info
(
"
take a look on the next reported time measure. If this increases a lot, one should think to
"
"
skip make_prediction() whenever it is possible to save time.
"
)
# skill scores on test data
self
.
calculate_test_score
()
# bootstraps
...
...
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