Type CudnnCompatibleGRUCell
Namespace tensorflow.contrib.cudnn_rnn
Parent GRUCell
Interfaces ICudnnCompatibleGRUCell
Cudnn Compatible GRUCell. A GRU impl akin to `tf.compat.v1.nn.rnn_cell.GRUCell` to use along with
tf.contrib.cudnn_rnn.CudnnGRU
. The latter's params can be used by
it seamlessly. It differs from platform-independent GRUs in how the new memory gate is
calculated. Nvidia picks this variant based on GRU author's[1] suggestion and
the fact it has no accuracy impact[2].
[1] https://arxiv.org/abs/1406.1078
[2] http://svail.github.io/diff_graphs/ Cudnn compatible GRU (from Cudnn library user guide):
Other GRU (see `tf.compat.v1.nn.rnn_cell.GRUCell` and
tf.contrib.rnn.GRUBlockCell
):
which is not equivalent to Cudnn GRU: in addition to the extra bias term b_Rh,
Show Example
# reset gate $$r_t = \sigma(x_t * W_r + h_t-1 * R_h + b_{Wr} + b_{Rr})$$ # update gate $$u_t = \sigma(x_t * W_u + h_t-1 * R_u + b_{Wu} + b_{Ru})$$ # new memory gate $$h'_t = tanh(x_t * W_h + r_t.* (h_t-1 * R_h + b_{Rh}) + b_{Wh})$$ $$h_t = (1 - u_t).* h'_t + u_t.* h_t-1$$
Properties
- activity_regularizer
- activity_regularizer_dyn
- built
- dtype
- dtype_dyn
- dynamic
- dynamic_dyn
- graph
- graph_dyn
- inbound_nodes
- inbound_nodes_dyn
- input
- input_dyn
- input_mask
- input_mask_dyn
- input_shape
- input_shape_dyn
- input_spec
- input_spec_dyn
- losses
- losses_dyn
- metrics
- metrics_dyn
- name
- name_dyn
- name_scope
- name_scope_dyn
- non_trainable_variables
- non_trainable_variables_dyn
- non_trainable_weights
- non_trainable_weights_dyn
- outbound_nodes
- outbound_nodes_dyn
- output
- output_dyn
- output_mask
- output_mask_dyn
- output_shape
- output_shape_dyn
- output_size
- output_size_dyn
- PythonObject
- rnncell_scope
- scope_name
- scope_name_dyn
- state_size
- state_size_dyn
- stateful
- submodules
- submodules_dyn
- supports_masking
- trainable
- trainable_dyn
- trainable_variables
- trainable_variables_dyn
- trainable_weights
- trainable_weights_dyn
- updates
- updates_dyn
- variables
- variables_dyn
- weights
- weights_dyn