tf.contrib.cudnn_rnn.CudnnLSTMSaveable
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'
)
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.
|
Attributes |
device
|
The device for SaveSpec Tensors.
|
format_converter
|
|
optional_restore
|
A hint to restore assertions that this object is optional.
|
Methods
restore
View source
restore(
restored_tensors, restored_shapes
)
Restores this object from 'restored_tensors'.
Args |
restored_tensors
|
the tensors that were loaded from a checkpoint
|
restored_shapes
|
the shapes this object should conform to after
restore, or None.
|
Returns |
An operation that restores the state of the object.
|
Raises |
ValueError
|
If the object cannot be restored using the provided
parameters.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]