Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BidirectonalLstmEncoder

A single-layer bidirectional LSTM encoder.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • BidirectonalLstmEncoder contructor.

    Parameters

    • lstmFwVars: LayerVars

      The forward LSTM LayerVars.

    • lstmBwVars: LayerVars

      The backward LSTM LayerVars.

    • Optional muVars: LayerVars

      (Optional) The LayerVars for projecting from the final states of the bidirectional LSTM to the mean mu of the random variable, z. The final states are returned directly if not provided.

    Returns BidirectonalLstmEncoder

Properties

lstmBwVars

lstmBwVars: LayerVars

lstmFwVars

lstmFwVars: LayerVars

muVars

muVars: LayerVars

zDims

zDims: number

Methods

encode

  • encode(sequence: tf.Tensor3D, segmentLengths?: number[]): Tensor<R2>
  • Encodes a batch of sequences.

    Parameters

    • sequence: tf.Tensor3D

      The batch of sequences to be encoded.

    • Optional segmentLengths: number[]

      Unused for this encoder.

    Returns Tensor<R2>

    A batch of concatenated final LSTM states, or the mu if muVars is known.

Generated using TypeDoc