Have a question? Connect with the community at the TensorFlow Forum Visit Forum

tfp.experimental.bijectors.build_trainable_highway_flow

Builds a HighwayFlow parameterized by trainable variables.

The variables are transformed to enforce the following parameter constraints:

  • residual_fraction is bounded between 0 and 1.
  • upper_diagonal_weights_matrix is a randomly initialized (lower) diagonal matrix with positive diagonal of size width x width.
  • lower_diagonal_weights_matrix is a randomly initialized lower diagonal matrix with ones on the diagonal of size width x width;
  • bias is a randomly initialized vector of size width.

width Input dimension of the bijector.
residual_fraction_initial_value Initial value for gating parameter, must be between 0 and 1.
activation_fn Callable invertible activation function (e.g., tf.nn.softplus), or None.
gate_first_n Decides which part of the input should be gated (useful for example when using auxiliary variables).
seed Seed for random initialization of the weights.
validate_args Python bool. Whether to validate input with runtime assertions. Default value: False.

trainable_highway_flow The initialized bijector.