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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Commits
f9d943c4
Commit
f9d943c4
authored
4 years ago
by
Felix Kleinert
Browse files
Options
Downloads
Patches
Plain Diff
update IntelliO3 model
parent
0a105e02
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!259
Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mlair/model_modules/abstract_model_class.py
+2
-0
2 additions, 0 deletions
mlair/model_modules/abstract_model_class.py
mlair/model_modules/model_class.py
+6
-2
6 additions, 2 deletions
mlair/model_modules/model_class.py
with
8 additions
and
2 deletions
mlair/model_modules/abstract_model_class.py
+
2
−
0
View file @
f9d943c4
...
@@ -6,6 +6,7 @@ import keras
...
@@ -6,6 +6,7 @@ import keras
import
tensorflow
as
tf
import
tensorflow
as
tf
from
mlair.helpers
import
remove_items
from
mlair.helpers
import
remove_items
from
keras
import
backend
as
K
class
AbstractModelClass
(
ABC
):
class
AbstractModelClass
(
ABC
):
...
@@ -36,6 +37,7 @@ class AbstractModelClass(ABC):
...
@@ -36,6 +37,7 @@ class AbstractModelClass(ABC):
self
.
__compile_options_is_set
=
False
self
.
__compile_options_is_set
=
False
self
.
_input_shape
=
input_shape
self
.
_input_shape
=
input_shape
self
.
_output_shape
=
self
.
__extract_from_tuple
(
output_shape
)
self
.
_output_shape
=
self
.
__extract_from_tuple
(
output_shape
)
self
.
avail_gpus
=
K
.
tensorflow_backend
.
_get_available_gpus
()
def
__getattr__
(
self
,
name
:
str
)
->
Any
:
def
__getattr__
(
self
,
name
:
str
)
->
Any
:
"""
"""
...
...
This diff is collapsed.
Click to expand it.
mlair/model_modules/model_class.py
+
6
−
2
View file @
f9d943c4
...
@@ -350,7 +350,7 @@ class MyTowerModel(AbstractModelClass):
...
@@ -350,7 +350,7 @@ class MyTowerModel(AbstractModelClass):
self
.
compile_options
=
{
"
loss
"
:
[
keras
.
losses
.
mean_squared_error
],
"
metrics
"
:
[
"
mse
"
]}
self
.
compile_options
=
{
"
loss
"
:
[
keras
.
losses
.
mean_squared_error
],
"
metrics
"
:
[
"
mse
"
]}
class
IntelliO3
_ts_a
rchitecture
(
AbstractModelClass
):
class
IntelliO3
TsA
rchitecture
(
AbstractModelClass
):
def
__init__
(
self
,
input_shape
:
list
,
output_shape
:
list
):
def
__init__
(
self
,
input_shape
:
list
,
output_shape
:
list
):
"""
"""
...
@@ -454,7 +454,11 @@ class IntelliO3_ts_architecture(AbstractModelClass):
...
@@ -454,7 +454,11 @@ class IntelliO3_ts_architecture(AbstractModelClass):
kernel_regularizer
=
self
.
regularizer
kernel_regularizer
=
self
.
regularizer
)
)
self
.
model
=
keras
.
Model
(
inputs
=
X_input
,
outputs
=
[
out_minor1
,
out_main
])
model
=
keras
.
Model
(
inputs
=
X_input
,
outputs
=
[
out_minor1
,
out_main
])
if
self
.
avail_gpus
==
0
:
self
.
model
=
model
else
:
self
.
model
=
keras
.
utils
.
multi_gpu_model
(
model
,
self
.
avail_gpus
)
def
set_compile_options
(
self
):
def
set_compile_options
(
self
):
self
.
optimizer
=
keras
.
optimizers
.
SGD
(
lr
=
self
.
initial_lr
,
momentum
=
0.9
)
self
.
optimizer
=
keras
.
optimizers
.
SGD
(
lr
=
self
.
initial_lr
,
momentum
=
0.9
)
...
...
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