deepof.model_utils.get_recurrent_block

deepof.model_utils.get_recurrent_block(x: Tensor, latent_dim: int, gru_unroll: bool, bidirectional_merge: str)

Build a recurrent embedding block, using a 1D convolution followed by two bidirectional GRU layers.

Parameters:
  • x (tf.Tensor) – Input tensor.

  • latent_dim (int) – Number of dimensions of the output tensor.

  • gru_unroll (bool) – whether to unroll the GRU layers. Defaults to False.

  • bidirectional_merge (str) – how to merge the forward and backward GRU layers. Defaults to “concat”.

Returns:

tf.keras.models.Model object with the specified architecture.