Builds a HighwayFlow parameterized by trainable variables.
tfp.experimental.bijectors.build_trainable_highway_flow(
width,
residual_fraction_initial_value=0.5,
activation_fn=None,
gate_first_n=None,
seed=None,
validate_args=False
)
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 sizewidth x width
.lower_diagonal_weights_matrix
is a randomly initialized lower diagonal matrix with ones on the diagonal of sizewidth x width
;bias
is a randomly initialized vector of sizewidth
.
Args | |
---|---|
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 .
|