Skip to content

Commit

Permalink
Adds support for multi-output models.
Browse files Browse the repository at this point in the history
Implements #154 and fixes #353.
  • Loading branch information
mikkokotila committed Jul 24, 2019
1 parent 42951e9 commit 2360cc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 4 additions & 1 deletion talos/scan/scan_finish.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def scan_finish(self):
except AttributeError:
out['x_shape'] = 'list'

out['y_shape'] = self.y.shape
try:
out['y_shape'] = self.y.shape
except AttributeError:
out['y_shape'] = 'list'

# final cleanup
keys = list(self.__dict__.keys())
Expand Down
8 changes: 0 additions & 8 deletions talos/scan/scan_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,11 @@ def scan_prepare(self):
self.saved_models = []
self.saved_weights = []

# create the data asset
self.y_max = self.y.max()

# handle validation split
from ..utils.validation_split import validation_split
self = validation_split(self)

# set data and len
self.shape = [self.x.shape, self.y.shape]
self._data_len = len(self.x)

# infer prediction type
from ..utils.detector import prediction_type
self = prediction_type(self)

return self

0 comments on commit 2360cc5

Please sign in to comment.