tfl.lattice_lib.canonicalize_trust

View source on GitHub

Converts string constants representing trust direction into integers.

tfl.lattice_lib.canonicalize_trust(trusts)

Args:

  • trusts: edgeworth_trusts or trapezoid_trusts hyperparameter of Lattice layer.

Raises:

ValueError if one of trust constraints is invalid.

Returns:

Trust constraints with direction represented as 0 or 1.