Converts an Yggdrasil model into a TensorFlow SavedModel / Keras model.
tfdf.keras.yggdrasil_model_to_keras_model(
src_path: str,
dst_path: str,
input_model_signature_fn: Optional[tf_core.InputModelSignatureFn] = tfdf.keras.build_default_input_model_signature
,
file_prefix: Optional[str] = None,
verbose: int = 1,
disable_categorical_integer_offset_correction: bool = False,
allow_slow_inference: bool = True,
keras_model_name: Optional[str] = None
) -> None
Args |
src_path
|
Path to input Yggdrasil Decision Forests model. The model can be a
directory or a zipped file.
|
dst_path
|
Path to output TensorFlow Decision Forests SavedModel model.
|
input_model_signature_fn
|
A lambda that returns the
(Dense,Sparse,Ragged)TensorSpec (or structure of TensorSpec e.g.
dictionary, list) corresponding to input signature of the model. If not
specified, the input model signature is created by
"build_default_input_model_signature". For example, specify
"input_model_signature_fn" if an numerical input feature (which is
consumed as DenseTensorSpec(float32) by default) will be feed differently
(e.g. RaggedTensor(int64)).
|
file_prefix
|
Prefix of the model files. Auto-detected if None.
|
verbose
|
Verbosity mode. 0 = silent, 1 = small details, 2 = full details.
|
disable_categorical_integer_offset_correction
|
Force the disabling of the
integer offset correction. See
disable_categorical_integer_offset_correction in AdvancedArguments for
more details.
|
name
|
Optional name of the resulting model.
|