![]() |
The abstract base class that represents a custom TensorFlow model.
mediapipe_model_maker.gesture_recognizer.gesture_recognizer.classifier.custom_model.CustomModel(
model_spec: Any, shuffle: bool
)
Args | |
---|---|
model_spec
|
Specification for the model. |
shuffle
|
Whether the training data need be shuffled. |
Methods
evaluate
@abc.abstractmethod
evaluate( data:
mediapipe_model_maker.quantization.ds.Dataset
, **kwargs )
Evaluates the model with the provided data.
export_tflite
export_tflite(
export_dir: str,
tflite_filename: str = 'model.tflite',
quantization_config: Optional[mediapipe_model_maker.quantization.QuantizationConfig
] = None,
preprocess: Optional[Callable[..., bool]] = None
)
Converts the model to requested formats.
Args | |
---|---|
export_dir
|
The directory to save exported files. |
tflite_filename
|
File name to save TFLite model. The full export path is {export_dir}/{tflite_filename}. |
quantization_config
|
The configuration for model quantization. |
preprocess
|
A callable to preprocess the representative dataset for quantization. The callable takes three arguments in order: feature, label, and is_training. |
summary
summary()
Prints a summary of the model.