Converts CudnnRNN params from canonical form to usable form.
Compat aliases for migration
See Migration guide for more details.
tf.raw_ops.CudnnRNNCanonicalToParams( num_layers, num_units, input_size, weights, biases, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, name=None )
Writes a set of weights into the opaque params buffer so they can be used in upcoming training or inferences.
Note that the params buffer may not be compatible across different GPUs. So any save and restoration should be converted to and from the canonical weights and biases.
num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. weights: the canonical form of weights that can be used for saving and restoration. They are more likely to be compatible across different generations. biases: the canonical form of biases that can be used for saving and restoration. They are more likely to be compatible across different generations. num_params: number of parameter sets for all layers. Each layer may contain multiple parameter sets, with each set consisting of a weight matrix and a bias vector. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. '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: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout.
weights: A list of at least 1
Tensorobjects with the same type in:
biases: A list with the same length as
Tensorobjects with the same type as
rnn_mode: An optional
"rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to
input_mode: An optional
"linear_input", "skip_input", "auto_select". Defaults to
direction: An optional
"unidirectional", "bidirectional". Defaults to
dropout: An optional
float. Defaults to
seed: An optional
int. Defaults to
seed2: An optional
int. Defaults to
name: A name for the operation (optional).
Tensor. Has the same type as