Module: tfl.premade
Stay organized with collections
Save and categorize content based on your preferences.
TF Lattice premade models implement typical monotonic model architectures.
You can use TFL premade models to easily construct commonly used monotonic model
architectures. To construct a TFL premade model, construct a model configuration
from tfl.configs
and pass it to the premade model constructor. No fields in
the model config will be automatically filled in, so the config must be fully
specified. Note that the inputs to the model should match the order in which
they are defined in the feature configs.
model_config = tfl.configs.CalibratedLatticeConfig(...)
calibrated_lattice_model = tfl.premade.CalibratedLattice(
model_config=model_config)
calibrated_lattice_model.compile(...)
calibrated_lattice_model.fit(...)
Supported models are defined in tfl.configs
. Each model architecture can be
used the same as any other keras.Model
.
Modules
premade_lib
module: Implementation of algorithms required for premade models.
Classes
class AggregateFunction
: Premade model for Tensorflow aggregate function learning models.
class CalibratedLattice
: Premade model for Tensorflow calibrated lattice models.
class CalibratedLatticeEnsemble
: Premade model for Tensorflow calibrated lattice ensemble models.
class CalibratedLinear
: Premade model for Tensorflow calibrated linear models.
Functions
get_custom_objects(...)
: Creates and returns a dictionary mapping names to custom objects.
Other Members |
absolute_import
|
Instance of __future__._Feature
|
division
|
Instance of __future__._Feature
|
print_function
|
Instance of __future__._Feature
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-02 UTC."],[],[],null,["# Module: tfl.premade\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/premade.py) |\n\nTF Lattice premade models implement typical monotonic model architectures.\n\nYou can use TFL premade models to easily construct commonly used monotonic model\narchitectures. To construct a TFL premade model, construct a model configuration\nfrom [`tfl.configs`](../tfl/configs) and pass it to the premade model constructor. No fields in\nthe model config will be automatically filled in, so the config must be fully\nspecified. Note that the inputs to the model should match the order in which\nthey are defined in the feature configs. \n\n model_config = tfl.configs.CalibratedLatticeConfig(...)\n calibrated_lattice_model = tfl.premade.CalibratedLattice(\n model_config=model_config)\n calibrated_lattice_model.compile(...)\n calibrated_lattice_model.fit(...)\n\nSupported models are defined in [`tfl.configs`](../tfl/configs). Each model architecture can be\nused the same as any other [`keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model).\n\nModules\n-------\n\n[`premade_lib`](../tfl/premade_lib) module: Implementation of algorithms required for premade models.\n\nClasses\n-------\n\n[`class AggregateFunction`](../tfl/premade/AggregateFunction): Premade model for Tensorflow aggregate function learning models.\n\n[`class CalibratedLattice`](../tfl/premade/CalibratedLattice): Premade model for Tensorflow calibrated lattice models.\n\n[`class CalibratedLatticeEnsemble`](../tfl/premade/CalibratedLatticeEnsemble): Premade model for Tensorflow calibrated lattice ensemble models.\n\n[`class CalibratedLinear`](../tfl/premade/CalibratedLinear): Premade model for Tensorflow calibrated linear models.\n\nFunctions\n---------\n\n[`get_custom_objects(...)`](../tfl/premade/get_custom_objects): Creates and returns a dictionary mapping names to custom objects.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Other Members ------------- ||\n|-----------------|-----------------------------------|\n| absolute_import | Instance of `__future__._Feature` |\n| division | Instance of `__future__._Feature` |\n| print_function | Instance of `__future__._Feature` |\n\n\u003cbr /\u003e"]]