Stay organized with collections Save and categorize content based on your preferences.

Loads data and train the model for test classification.

Used in the notebooks

Used in the tutorials

train_data Training data.
model_spec Specification for the model.
validation_data Validation data. If None, skips validation process.
batch_size Batch size for training.
epochs Number of epochs for training.
steps_per_epoch Integer or None. Total number of steps (batches of samples) before declaring one epoch finished and starting the next epoch. If steps_per_epoch is None, the epoch will run until the input dataset is exhausted.
shuffle Whether the data should be shuffled.
do_train Whether to run training.

An instance based on TextClassifier.