Loads data and train the model for test classification.
@classmethod
tflite_model_maker.text_classifier.create(
train_data,
model_spec='average_word_vec',
validation_data=None,
batch_size=None,
epochs=3,
steps_per_epoch=None,
shuffle=False,
do_train=True
)
Used in the notebooks
Args |
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.
|
Returns |
An instance based on TextClassifier.
|