Module: tfl.lattice_lib

Implementation of algorithms required for Lattice layer.

Functions

assert_constraints(...): Asserts that weights satisfy constraints.

batch_outer_operation(...): Computes outer operation of last dimensions of each of given tensors.

compute_interpolation_weights(...): Computes weights for hypercube lattice interpolation.

evaluate_with_hypercube_interpolation(...): Evaluates a lattice using hypercube interpolation.

evaluate_with_simplex_interpolation(...): Evaluates a lattice using simplex interpolation.

finalize_constraints(...): Approximately projects lattice weights to strictly satisfy all constraints.

laplacian_regularizer(...): Returns Laplacian regularization loss for Lattice layer.

linear_initializer(...): Returns a lattice layer weight tensor that represents a linear function.

project_by_dykstra(...): Applies dykstra's projection algorithm for monotonicity/trust constraints.

random_monotonic_initializer(...): Returns a uniformly random sampled monotonic lattice layer weight tensor.

torsion_regularizer(...): Returns Torsion regularization loss for Lattice layer.

verify_hyperparameters(...): Verifies that all given hyperparameters are consistent.