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
661466cf
Commit
661466cf
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
initialised training module
parent
d248e47d
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!24
include recent development
,
!20
not distributed training
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/training.py
+19
-0
19 additions, 0 deletions
src/modules/training.py
with
19 additions
and
0 deletions
src/modules/training.py
0 → 100644
+
19
−
0
View file @
661466cf
__author__
=
"
Lukas Leufen
"
__date__
=
'
2019-12-05
'
from
src.modules.run_environment
import
RunEnvironment
class
Training
(
RunEnvironment
):
def
__init__
(
self
):
super
().
__init__
()
self
.
model
=
self
.
data_store
.
get
(
"
model
"
,
"
general.model
"
)
def
make_predict_function
(
self
):
# create the predict function before distributing. This is necessary, because tf will compile the predict
# function just in the moment it is used the first time. This can cause problems, if the model is distributed
# on different workers. To prevent this, the function is pre-compiled. See discussion @
# https://stackoverflow.com/questions/40850089/is-keras-thread-safe/43393252#43393252
self
.
model
.
_make_predict_function
()
\ No newline at end of file
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