tf.contrib.cudnn_rnn.CudnnParamsFormatConverterGRU
Stay organized with collections
Save and categorize content based on your preferences.
Helper class that converts between params of Cudnn and TF GRU.
tf.contrib.cudnn_rnn.CudnnParamsFormatConverterGRU(
num_layers, num_units, input_size, num_proj=None,
input_mode=CUDNN_INPUT_LINEAR_MODE, direction=CUDNN_RNN_UNIDIRECTION
)
Args |
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.
|
num_proj
|
The output dimensionality for the projection matrices.
If None or 0, no projection is performed.
|
input_mode
|
indicate whether there is a linear projection between the
input and the actual computation before the first layer. It could be one
of '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'
|
Methods
opaque_to_tf_canonical
View source
opaque_to_tf_canonical(
opaque_param
)
Converts cudnn opaque param to tf canonical weights.
tf_canonical_to_opaque
View source
tf_canonical_to_opaque(
tf_canonicals, weights_proj=None
)
Converts tf canonical weights to cudnn opaque param.
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."],[],[],null,["# tf.contrib.cudnn_rnn.CudnnParamsFormatConverterGRU\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py#L584-L658) |\n\nHelper class that converts between params of Cudnn and TF GRU. \n\n tf.contrib.cudnn_rnn.CudnnParamsFormatConverterGRU(\n num_layers, num_units, input_size, num_proj=None,\n input_mode=CUDNN_INPUT_LINEAR_MODE, direction=CUDNN_RNN_UNIDIRECTION\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `num_layers` | the number of layers for the RNN model. |\n| `num_units` | the number of units within the RNN model. |\n| `input_size` | the size of the input, it could be different from the num_units. |\n| `num_proj` | The output dimensionality for the projection matrices. If None or 0, no projection is performed. |\n| `input_mode` | indicate whether there is a linear projection between the input and the actual computation before the first layer. It could be one of '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'. |\n| `direction` | the direction model that the model operates. Could be either 'unidirectional' or 'bidirectional' |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `opaque_to_tf_canonical`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py#L230-L240) \n\n opaque_to_tf_canonical(\n opaque_param\n )\n\nConverts cudnn opaque param to tf canonical weights.\n\n### `tf_canonical_to_opaque`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py#L222-L228) \n\n tf_canonical_to_opaque(\n tf_canonicals, weights_proj=None\n )\n\nConverts tf canonical weights to cudnn opaque param."]]