View source on GitHub |
Creates a feed-forward network as tf.keras.Sequential
.
tfr.keras.layers.create_tower(
hidden_layer_dims: List[int],
output_units: int,
activation: Optional[Callable[..., tf.Tensor]] = None,
input_batch_norm: bool = False,
use_batch_norm: bool = True,
batch_norm_moment: float = 0.999,
dropout: float = 0.5,
name: Optional[str] = None,
**kwargs
)
It creates a feed-forward network with batch normalization and dropout, and optionally applies batch normalization on inputs.
Example usage:
tower = create_tower(hidden_layer_dims=[64, 32, 16], output_units=1)
inputs = tf.ones([2, 3, 1])
tower_logits = tower(inputs)
Returns | |
---|---|
A tf.keras.Sequential object.
|