# tf.contrib.cudnn_rnn.CudnnLSTMSaveable

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py#L910-L942) |

SaveableObject implementation handling Cudnn LSTM opaque params.

    tf.contrib.cudnn_rnn.CudnnLSTMSaveable(
        opaque_params, num_layers, num_units, input_size,
        input_mode=CUDNN_INPUT_LINEAR_MODE, direction=CUDNN_RNN_UNIDIRECTION,
        scope=None, name='cudnn_rnn_saveable'
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `opaque_params` | a variable, Cudnn RNN opaque params. |
| `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 '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' |
| `scope` | string of VariableScope, the scope of equivalent subgraph consisting only platform-independent tf RNN cells. |
| `name` | the name of the CudnnOpaqueParamsSaveable object. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `device` | The device for SaveSpec Tensors. |
| `format_converter` | <br /> <br /> |
| `optional_restore` | A hint to restore assertions that this object is optional. |

<br />

## Methods

### `restore`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py#L832-L836)

    restore(
        restored_tensors, restored_shapes
    )

Restores this object from 'restored_tensors'.

<br />

<br />

<br />

| Args ||
|---|---|
| `restored_tensors` | the tensors that were loaded from a checkpoint |
| `restored_shapes` | the shapes this object should conform to after restore, or None. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| An operation that restores the state of the object. ||

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `ValueError` | If the object cannot be restored using the provided parameters. |

<br />