Options
All
  • Public
  • Public/Protected
  • All
Menu

LSTM decoder with optional NADE output.

Hierarchy

Index

Constructors

constructor

  • BaseDecoder contructor.

    Parameters

    • lstmCellVars: LayerVars[]

      The LayerVars for each layer of the decoder LSTM.

    • zToInitStateVars: LayerVars

      The LayerVars for projecting from the latent variable z to the initial states of the LSTM layers.

    • outputProjectVars: LayerVars

      The LayerVars for projecting from the output of the LSTM to the logits of the output categorical distrubtion (if nade is null) or to bias values to use in the NADE (if nade is not null).

    • Optional nade: Nade

      (optional) A Nade to use for computing the output vectors at each step. If not given, the final projection values are used as logits for a categorical distribution.

    Returns BaseDecoder

Properties

lstmCellVars

lstmCellVars: LayerVars[]

nade

nade: Nade

outputDims

outputDims: number

outputProjectVars

outputProjectVars: LayerVars

zDims

zDims: number

zToInitStateVars

zToInitStateVars: LayerVars

Methods

decode

  • decode(z: tf.Tensor2D, length: number, initialInput?: tf.Tensor2D, temperature?: number, controls?: tf.Tensor2D): Tensor<R3>
  • Decodes a batch of latent vectors, z.

    If nade is parameterized, samples are generated using the MAP (argmax) of the Bernoulli random variables from the NADE, and these bit vector makes up the final dimension of the output.

    If nade is not parameterized, sample labels are generated using the MAP (argmax) of the logits output by the LSTM, and the onehots of those labels makes up the final dimension of the output.

    Parameters

    • z: tf.Tensor2D

      A batch of latent vectors to decode, sized [batchSize, zDims].

    • length: number

      The length of decoded sequences.

    • Optional initialInput: tf.Tensor2D
    • Optional temperature: number

      (Optional) The softmax temperature to use when sampling from the logits. Argmax is used if not provided.

    • Optional controls: tf.Tensor2D

      (Optional) Control tensors to use for conditioning, sized [length, controlDepth].

    Returns Tensor<R3>

    A boolean tensor containing the decoded sequences, shaped [batchSize, length, depth].

Generated using TypeDoc