Save the date! Google I/O returns May 18-20 Register now

Module: tfl.premade

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(

Supported models are defined in tfl.configs. Each model architecture can be used the same as any other tf.keras.Model.


premade_lib module: Implementation of algorithms required for premade models.


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.


get_custom_objects(...): Creates and returns a dictionary mapping names to custom objects.