def fit(self, dataset: dataset.Dataset, dev_dataset: dataset.Dataset, augmentation: augmentation.Augmentation = None, prepared_features: bool = False, **kwargs) -> keras.callbacks.History: """ Get ready data, compile and train a model. """ dataset = self.wrap_preprocess(dataset) dev_dataset = self.wrap_preprocess(dev_dataset) if not self._model.optimizer: # a loss function and an optimizer self.compile_model() # have to be set before the training return self._model.fit(dataset, validation_data=dev_dataset, **kwargs)
from example configuration (examples/use_augmentation.py)
pipeline.fit(dataset, dev_dataset, epochs=25, augmentation=spec_augment)
SpecAugment is passed in the pipeline.fit() method, but never used.
def fit(self, dataset: dataset.Dataset, dev_dataset: dataset.Dataset, augmentation: augmentation.Augmentation = None, prepared_features: bool = False, **kwargs) -> keras.callbacks.History: """ Get ready data, compile and train a model. """ dataset = self.wrap_preprocess(dataset) dev_dataset = self.wrap_preprocess(dev_dataset) if not self._model.optimizer: # a loss function and an optimizer self.compile_model() # have to be set before the training return self._model.fit(dataset, validation_data=dev_dataset, **kwargs)
from example configuration (examples/use_augmentation.py) pipeline.fit(dataset, dev_dataset, epochs=25, augmentation=spec_augment)
SpecAugment is passed in the pipeline.fit() method, but never used.