Class CudnnParamsFormatConverterTanh
Defined in tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py
.
Helper class that converts between params of Cudnn and TF Tanh RNN.
__init__
__init__(
num_layers,
num_units,
input_size,
input_mode=CUDNN_INPUT_LINEAR_MODE,
direction=CUDNN_RNN_UNIDIRECTION
)
Constructor.
Args:
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.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
tf.contrib.cudnn_rnn.CudnnParamsFormatConverterTanh.opaque_to_tf_canonical
opaque_to_tf_canonical(opaque_param)
Converts cudnn opaque param to tf canonical weights.
tf.contrib.cudnn_rnn.CudnnParamsFormatConverterTanh.tf_canonical_to_opaque
tf_canonical_to_opaque(tf_canonicals)
Converts tf canonical weights to cudnn opaque param.