parameters: (rnn_mode,
                                           num_layers,
                                           num_units,
                                           input_size,
                                           weights,
                                           biases,
                                           input_mode=CUDNN_INPUT_LINEAR_MODE,
                                           direction=CUDNN_RNN_UNIDIRECTION,
                                           dropout=0,
                                           seed=0,
                                           num_proj=None,
                                           name=None)
docstring: Converts params from the canonical format to a specific format of cuDNN.
  
    Args:
      rnn_mode: a string specifies the mode, under which this RNN model runs.
        Could be either 'lstm', 'gru', 'rnn_tanh' or 'rnn_relu'.
      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.
      weights: a Tensor for weight parameters.
      biases: a Tensor for bias parameters.
      input_mode: indicate whether there is a linear projection between the input
        and the actual computation before the first layer. It could be
        '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'
      dropout: whether to enable dropout. With it is 0, dropout is disabled.
      seed: the op seed used for initializing dropout. See
        `tf.compat.v1.set_random_seed` for behavior.
      num_proj: The output dimensionality for the projection matrices.
        If None or 0, no projection is performed.
      name: name of the operation.
  
    Returns:
      an opaque Cudnn param.
    Raises:
      ValueError: if rnn_mode or direction is invalid.
docstring_summary: Converts params from the canonical format to a specific format of cuDNN.
docstring_tokens: Converts params from the canonical format to a specific format of cuDNN .
function: def cudnn_rnn_canonical_to_opaque_params(rnn_mode,
                                           num_layers,
                                           num_units,
                                           input_size,
                                           weights,
                                           biases,
                                           input_mode=CUDNN_INPUT_LINEAR_MODE,
                                           direction=CUDNN_RNN_UNIDIRECTION,
                                           dropout=0,
                                           seed=0,
                                           num_proj=None,
                                           name=None):
    """Converts params from the canonical format to a specific format of cuDNN.
  
    Args:
      rnn_mode: a string specifies the mode, under which this RNN model runs.
        Could be either 'lstm', 'gru', 'rnn_tanh' or 'rnn_relu'.
      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.
      weights: a Tensor for weight parameters.
      biases: a Tensor for bias parameters.
      input_mode: indicate whether there is a linear projection between the input
        and the actual computation before the first layer. It could be
        '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'
      dropout: whether to enable dropout. With it is 0, dropout is disabled.
      seed: the op seed used for initializing dropout. See
        `tf.compat.v1.set_random_seed` for behavior.
      num_proj: The output dimensionality for the projection matrices.
        If None or 0, no projection is performed.
      name: name of the operation.
  
    Returns:
      an opaque Cudnn param.
    Raises:
      ValueError: if rnn_mode or direction is invalid.
    """
    _check_rnn_mode(rnn_mode)
    check_direction(direction)
    check_input_mode(input_mode)
    seed, seed2 = random_seed.get_seed(seed)
    if num_proj is not None and num_proj != 0:
      return gen_cudnn_rnn_ops.cudnn_rnn_canonical_to_params_v2(
          rnn_mode=rnn_mode,
          num_layers=num_layers,
          num_units=num_units,
          input_size=input_size,
          weights=weights,
          biases=biases,
          input_mode=input_mode,
          direction=direction,
          dropout=dropout,
          seed=seed,
          seed2=seed2,
          num_proj=num_proj,
          name=name)
    else:
      return gen_cudnn_rnn_ops.cudnn_rnn_canonical_to_params(
          rnn_mode=rnn_mode,
          num_layers=num_layers,
          num_units=num_units,
          input_size=input_size,
          weights=weights,
          biases=biases,
          input_mode=input_mode,
          direction=direction,
          dropout=dropout,
          seed=seed,
          seed2=seed2,
          name=name)
function_tokens: def cudnn_rnn_canonical_to_opaque_params ( rnn_mode , num_layers , num_units , input_size , weights , biases , input_mode = CUDNN_INPUT_LINEAR_MODE , direction = CUDNN_RNN_UNIDIRECTION , dropout = 0 , seed = 0 , num_proj = None , name = None ) : _check_rnn_mode ( rnn_mode ) check_direction ( direction ) check_input_mode ( input_mode ) seed , seed2 = random_seed . get_seed ( seed ) if num_proj is not None and num_proj != 0 : return gen_cudnn_rnn_ops . cudnn_rnn_canonical_to_params_v2 ( rnn_mode = rnn_mode , num_layers = num_layers , num_units = num_units , input_size = input_size , weights = weights , biases = biases , input_mode = input_mode , direction = direction , dropout = dropout , seed = seed , seed2 = seed2 , num_proj = num_proj , name = name ) else : return gen_cudnn_rnn_ops . cudnn_rnn_canonical_to_params ( rnn_mode = rnn_mode , num_layers = num_layers , num_units = num_units , input_size = input_size , weights = weights , biases = biases , input_mode = input_mode , direction = direction , dropout = dropout , seed = seed , seed2 = seed2 , name = name )