IBM/pytorchpipe

View on GitHub
configs/default/components/models/general_usage/attention_decoder.yml

Summary

Maintainability
Test Coverage
# This file defines the default values for the RNN model.

####################################################################
# 1. CONFIGURATION PARAMETERS that will be LOADED by the component.
####################################################################

# Size of the hidden state (LOADED)
hidden_size: 100

# Wether to include the last hidden state in the outputs
output_last_state: False

# Type of recurrent cell (LOADED)
# -> Only GRU is supported

# Number of "stacked" layers (LOADED)
# -> Only a single layer is supported

# Dropout rate (LOADED)
# Default: 0 (means that it is turned off)
dropout_rate: 0

# Prediction mode (LOADED)
# Options: 
#   * Dense (passes every activation through output layer) |
#   * Last (passes only the last activation though output layer) |
#   * None (all outputs are discarded)
prediction_mode: Dense

# Enable FFN layer at the output of the RNN (before eventual feed back in the case of autoregression).
# Useful if the raw outputs of the RNN are needed, for attention encoder-decoder for example.
ffn_output: True

# Length of generated output sequence (LOADED)
# User must set it per task, as it is task specific.
autoregression_length: 10

# If true, output of the last layer will be additionally processed with Log Softmax (LOADED)
use_logsoftmax: True

streams: 
  ####################################################################
  # 2. Keymappings associated with INPUT and OUTPUT streams.
  ####################################################################

  # Stream containing batch of encoder outputs (INPUT)
  inputs: inputs

  # Stream containing the inital state of the RNN (INPUT)
  # The stream will be actually created only if `inital_state: Input`
  input_state: input_state

  # Stream containing predictions (OUTPUT)
  predictions: predictions

  # Stream containing the final output state of the RNN (output)
  # The stream will be actually created only if `output_last_state: True`
  output_state: output_state

globals:
  ####################################################################
  # 3. Keymappings of variables that will be RETRIEVED from GLOBALS.
  ####################################################################

  # Size of the input (RETRIEVED)
  input_size: input_size

  # Size of the prediction (RETRIEVED)
  prediction_size: prediction_size

  ####################################################################
  # 4. Keymappings associated with GLOBAL variables that will be SET.
  ####################################################################

  ####################################################################
  # 5. Keymappings associated with statistics that will be ADDED.
  ####################################################################