def train(self, training_data, domain, **kwargs):
    self.model = self.model_architecture(domain.num_features, domain.num_actions, training_data.max_history())
    (shuffled_X, shuffled_y) = training_data.shuffled(domain)
    validation_split = kwargs.get('validation_split', 0.0)
    logger.info('Fitting model with {} total samples and a validation split of {}'.format(training_data.num_examples(), validation_split))
    self.model.fit(shuffled_X, shuffled_y, **kwargs)
    self.current_epoch = kwargs.get('epochs', 10)
    logger.info('Done fitting keras policy model')
def train(self, training_data, domain, **kwargs):
    self.model = self.model_architecture(domain.num_features, domain.num_actions, training_data.max_history())
    (shuffled_X, shuffled_y) = training_data.shuffled(domain)
    validation_split = kwargs.get('validation_split', 0.0)
    logger.info('Fitting model with {} total samples and a validation split of {}'.format(training_data.num_examples(), validation_split))
    self.model.fit(shuffled_X, shuffled_y, **kwargs)
    self.current_epoch = kwargs.get('epochs', 10)
    logger.info('Done fitting keras policy model')