Loads data and train the model for recommendation.
@classmethod
tflite_model_maker.recommendation.create(
train_data,
model_spec: tflite_model_maker.recommendation.ModelSpec
,
model_dir: str = None,
validation_data=None,
batch_size: int = 16,
steps_per_epoch: int = 10000,
epochs: int = 1,
learning_rate: float = 0.1,
gradient_clip_norm: float = 1.0,
shuffle: bool = True,
do_train: bool = True
)
Args |
train_data
|
Training data.
|
model_spec
|
ModelSpec, Specification for the model.
|
model_dir
|
str, path to export model checkpoints and summaries.
|
validation_data
|
Validation data.
|
batch_size
|
Batch size for training.
|
steps_per_epoch
|
int, Number of step per epoch.
|
epochs
|
int, Number of epochs for training.
|
learning_rate
|
float, learning rate.
|
gradient_clip_norm
|
float, clip threshold (<= 0 meaning no clip).
|
shuffle
|
boolean, whether the training data should be shuffled.
|
do_train
|
boolean, whether to run training.
|
Returns |
An instance based on Recommendation.
|