tf.contrib.cudnn_rnn.CudnnParamsFormatConverterGRU

View source on GitHub

Helper class that converts between params of Cudnn and TF GRU.

num_layers the number of layers for the RNN model.
num_units the number of units within the RNN model.
input_size the size of the input, it could be different from the num_units.
num_proj The output dimensionality for the projection matrices. If None or 0, no projection is performed.
input_mode indicate whether there is a linear projection between the input and the actual computation before the first layer. It could be one of 'linear_input', 'skip_input' or 'auto_select'. * 'linear_input' (default) always applies a linear projection of input onto RNN hidden state. (standard RNN behavior). * 'skip_input' is only allowed when input_size == num_units; * 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'.
direction the direction model that the model operates. Could be either 'unidirectional' or 'bidirectional'

Methods

opaque_to_tf_canonical

View source

Converts cudnn opaque param to tf canonical weights.

tf_canonical_to_opaque

View source

Converts tf canonical weights to cudnn opaque param.