Type MaskedLSTMCell
Namespace tensorflow.contrib.model_pruning
Parent LSTMCell
Interfaces IMaskedLSTMCell
LSTMCell with pruning. Overrides the call method of tensorflow LSTMCell and injects the weight masks.
Masks are applied to only the weight matrix of the LSTM and not the
projection matrix.
Methods
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
Public static methods
MaskedLSTMCell NewDyn(object num_units, ImplicitContainer<T> use_peepholes, object cell_clip, object initializer, object num_proj, object proj_clip, object num_unit_shards, object num_proj_shards, ImplicitContainer<T> forget_bias, ImplicitContainer<T> state_is_tuple, object activation, object reuse)
Initialize the parameters for an LSTM cell with masks for pruning.
Parameters
-
object
num_units - int, The number of units in the LSTM cell
-
ImplicitContainer<T>
use_peepholes - bool, set True to enable diagonal/peephole connections.
-
object
cell_clip - (optional) A float value, if provided the cell state is clipped by this value prior to the cell output activation.
-
object
initializer - (optional) The initializer to use for the weight and projection matrices.
-
object
num_proj - (optional) int, The output dimensionality for the projection matrices. If None, no projection is performed.
-
object
proj_clip - (optional) A float value. If `num_proj > 0` and `proj_clip` is provided, then the projected values are clipped elementwise to within `[-proj_clip, proj_clip]`.
-
object
num_unit_shards - Deprecated, will be removed by Jan. 2017. Use a variable_scope partitioner instead.
-
object
num_proj_shards - Deprecated, will be removed by Jan. 2017. Use a variable_scope partitioner instead.
-
ImplicitContainer<T>
forget_bias - Biases of the forget gate are initialized by default to 1 in order to reduce the scale of forgetting at the beginning of the training. Must set it manually to `0.0` when restoring from CudnnLSTM trained checkpoints.
-
ImplicitContainer<T>
state_is_tuple - If True, accepted and returned states are 2-tuples of the `c_state` and `m_state`. If False, they are concatenated along the column axis. This latter behavior will soon be deprecated.
-
object
activation - Activation function of the inner states. Default: `tanh`.
-
object
reuse - (optional) Python boolean describing whether to reuse variables in an existing scope. If not `True`, and the existing scope already has the given variables, an error is raised. When restoring from CudnnLSTM-trained checkpoints, must use CudnnCompatibleLSTMCell instead.