Loads data and retrains the model.
@classmethod
tflite_model_maker.audio_classifier.create(
train_data,
model_spec,
validation_data=None,
batch_size=32,
epochs=5,
model_dir=None,
do_train=True,
train_whole_model=False
)
Used in the notebooks
Args |
train_data
|
A instance of audio_dataloader.DataLoader class.
|
model_spec
|
Specification for the model.
|
validation_data
|
Validation DataLoader. If None, skips validation process.
|
batch_size
|
Number of samples per training step. If use_hub_library is
False, it represents the base learning rate when train batch size is 256
and it's linear to the batch size.
|
epochs
|
Number of epochs for training.
|
model_dir
|
The location of the model checkpoint files.
|
do_train
|
Whether to run training.
|
train_whole_model
|
Boolean. By default, only the classification head is
trained. When True, the base model is also trained.
|
Returns |
An instance based on AudioClassifier.
|