|
|
@ -76,6 +76,7 @@ class Learner(Process):
|
|
|
|
# sel.max_epoc
|
|
|
|
# sel.max_epoc
|
|
|
|
self.logger = None
|
|
|
|
self.logger = None
|
|
|
|
if 'logger' in self.store :
|
|
|
|
if 'logger' in self.store :
|
|
|
|
|
|
|
|
# self.store['logger']['context'] = 'write'
|
|
|
|
self.logger = transport.factory.instance(**self.store['logger'])
|
|
|
|
self.logger = transport.factory.instance(**self.store['logger'])
|
|
|
|
self.autopilot = False #-- to be set by caller
|
|
|
|
self.autopilot = False #-- to be set by caller
|
|
|
|
self._initStateSpace()
|
|
|
|
self._initStateSpace()
|
|
|
@ -243,7 +244,7 @@ class Trainer(Learner):
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# @TODO Log that the dataset was empty or not statistically relevant
|
|
|
|
# @TODO Log that the dataset was empty or not statistically relevant
|
|
|
|
return
|
|
|
|
return
|
|
|
|
_space,_matrix = self._encoder.convert()
|
|
|
|
_space,_matrix = self._encoder._convert()
|
|
|
|
|
|
|
|
|
|
|
|
_args = self.network_args
|
|
|
|
_args = self.network_args
|
|
|
|
if self.gpu :
|
|
|
|
if self.gpu :
|
|
|
@ -341,7 +342,7 @@ class Generator (Learner):
|
|
|
|
# The values will be returned because we have provided _map information from the constructor
|
|
|
|
# The values will be returned because we have provided _map information from the constructor
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
values,_matrix = self._encoder.convert()
|
|
|
|
values,_matrix = self._encoder._convert()
|
|
|
|
_args = self.network_args
|
|
|
|
_args = self.network_args
|
|
|
|
_args['map'] = self._map
|
|
|
|
_args['map'] = self._map
|
|
|
|
_args['values'] = np.array(values)
|
|
|
|
_args['values'] = np.array(values)
|
|
|
@ -353,7 +354,7 @@ class Generator (Learner):
|
|
|
|
gHandler = gan.Predict(**_args)
|
|
|
|
gHandler = gan.Predict(**_args)
|
|
|
|
gHandler.load_meta(columns=None)
|
|
|
|
gHandler.load_meta(columns=None)
|
|
|
|
_iomatrix = gHandler.apply()
|
|
|
|
_iomatrix = gHandler.apply()
|
|
|
|
_candidates= [ self._encoder.revert(matrix=_item) for _item in _iomatrix]
|
|
|
|
_candidates= [ self._encoder._revert(matrix=_item) for _item in _iomatrix]
|
|
|
|
|
|
|
|
|
|
|
|
_size = np.sum([len(_item) for _item in _iomatrix])
|
|
|
|
_size = np.sum([len(_item) for _item in _iomatrix])
|
|
|
|
_log = {'action':'io-data','input':{'candidates':len(_candidates),'rows':int(_size)}}
|
|
|
|
_log = {'action':'io-data','input':{'candidates':len(_candidates),'rows':int(_size)}}
|
|
|
|