Skip to content
Snippets Groups Projects
Commit 661466cf authored by lukas leufen's avatar lukas leufen
Browse files

initialised training module

parent d248e47d
Branches
Tags
2 merge requests!24include recent development,!20not distributed training
__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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment