def _fit(model: Estimator, iterator: BasicDatasetIterator, train_config={}) -> Estimator: x, y = iterator.iter_all('train') model.fit(x, y) model.save() return model
def _fit_batches(model: Estimator, iterator: DataFittingIterator, train_config) -> Estimator: model.fit_batches(iterator, batch_size=train_config['batch_size']) model.save() return model
def _fit(model: Estimator, iterator: DataLearningIterator, train_config) -> Estimator: x, y = iterator.get_instances('train') model.fit(x, y) model.save() return model
def _fit(model: Estimator, dataset: Dataset, train_config={}): x, y = dataset.iter_all('train') model.fit(x, y) model.save() return model