Descriptor for an LSTM backward propagation primitive. More...
#include <dnnl.hpp>
Public Member Functions | |
desc (prop_kind prop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &weights_peephole_desc, const memory::desc &weights_projection_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_src_iter_c_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_weights_peephole_desc, const memory::desc &diff_weights_projection_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, const memory::desc &diff_dst_iter_c_desc, rnn_flags flags=rnn_flags::undef) | |
Constructs an LSTM (with or without peephole and with or without projection) descriptor for backward propagation using prop_kind , direction , and memory descriptors. More... | |
desc (prop_kind prop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &weights_peephole_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_src_iter_c_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_weights_peephole_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, const memory::desc &diff_dst_iter_c_desc, rnn_flags flags=rnn_flags::undef) | |
Constructs an LSTM (with or without peephole) descriptor for backward propagation using prop_kind , direction , and memory descriptors. More... | |
desc (prop_kind prop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_src_iter_c_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, const memory::desc &diff_dst_iter_c_desc, rnn_flags flags=rnn_flags::undef) | |
Constructs an LSTM descriptor for backward propagation using prop_kind , direction , and memory descriptors. More... | |
Descriptor for an LSTM backward propagation primitive.
|
inline |
Constructs an LSTM (with or without peephole and with or without projection) descriptor for backward propagation using prop_kind
, direction
, and memory descriptors.
The src_iter_desc
together with diff_iter_desc
, src_iter_c_desc
together with src_iter_c_desc
, weights_peephole_desc
together with diff_weights_peephole_desc
, bias_desc
together with diff_bias_desc
, dst_iter_desc
together with diff_dst_iter_desc
, and dst_iter_c_desc
together with diff_dst_iter_c_desc
, may point to a zero memory descriptor. This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead.
The weights_projection_desc
together with diff_weights_projection_desc
may point to a zero memory descriptor. This would then indicate that the LSTM doesn't have recurrent projection layer.
format_tag
.Inputs:
Outputs:
prop_kind | Propagation kind. Must be dnnl::prop_kind::backward. |
direction | RNN direction. See dnnl::rnn_direction for more info. |
src_layer_desc | Memory descriptor for the input vector. |
src_iter_desc | Memory descriptor for the input recurrent hidden state vector. |
src_iter_c_desc | Memory descriptor for the input recurrent cell state vector. |
weights_layer_desc | Memory descriptor for the weights applied to the layer input. |
weights_iter_desc | Memory descriptor for the weights applied to the recurrent input. |
weights_peephole_desc | Memory descriptor for the weights applied to the cell states (according to the Peephole LSTM formula). |
weights_projection_desc | Memory descriptor for the weights applied to the hidden states to get the recurrent projection (according to the Projection LSTM formula). |
bias_desc | Bias memory descriptor. |
dst_layer_desc | Memory descriptor for the output vector. |
dst_iter_desc | Memory descriptor for the output recurrent hidden state vector. |
dst_iter_c_desc | Memory descriptor for the output recurrent cell state vector. |
diff_src_layer_desc | Memory descriptor for the diff of input vector. |
diff_src_iter_desc | Memory descriptor for the diff of input recurrent hidden state vector. |
diff_src_iter_c_desc | Memory descriptor for the diff of input recurrent cell state vector. |
diff_weights_layer_desc | Memory descriptor for the diff of weights applied to the layer input. |
diff_weights_iter_desc | Memory descriptor for the diff of weights applied to the recurrent input. |
diff_weights_peephole_desc | Memory descriptor for the diff of weights applied to the cell states (according to the Peephole LSTM formula). |
diff_weights_projection_desc | Memory descriptor for the diff of weights applied to the hidden states to get the recurrent projection (according to the Projection LSTM formula). |
diff_bias_desc | Diff bias memory descriptor. |
diff_dst_layer_desc | Memory descriptor for the diff of output vector. |
diff_dst_iter_desc | Memory descriptor for the diff of output recurrent hidden state vector. |
diff_dst_iter_c_desc | Memory descriptor for the diff of output recurrent cell state vector. |
flags | Unused. |
|
inline |
Constructs an LSTM (with or without peephole) descriptor for backward propagation using prop_kind
, direction
, and memory descriptors.
The src_iter_desc
together with diff_iter_desc
, src_iter_c_desc
together with src_iter_c_desc
, weights_peephole_desc
together with diff_weights_peephole_desc
, bias_desc
together with diff_bias_desc
, dst_iter_desc
together with diff_dst_iter_desc
, and dst_iter_c_desc
together with diff_dst_iter_c_desc
, may point to a zero memory descriptor. This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead.
format_tag
.Inputs:
src_layer
(dnnl::primitive_desc_base::src_desc(0
))src_iter
(dnnl::primitive_desc_base::src_desc(1
)), if usedsrc_iter_c
(dnnl::primitive_desc_base::src_desc(2
)), if usedweights_layer
(dnnl::primitive_desc_base::weights_desc(0
))weights_iter
(dnnl::primitive_desc_base::weights_desc(1
))weights_peephole
(dnnl::primitive_desc_base::weights_desc(2
)), if usedbias
(dnnl::primitive_desc_base::weights_desc(2
)), if used and LSTM is without peepholebias
(dnnl::primitive_desc_base::weights_desc(3
)), if used and LSTM is with peepholedst_layer
(dnnl::primitive_desc_base::dst_desc(0
))dst_iter
(dnnl::primitive_desc_base::dst_desc(1
)), if useddst_iter_c
(dnnl::primitive_desc_base::dst_desc(2
)), if useddiff_dst_layer
(dnnl::primitive_desc_base::diff_dst_desc(0
))diff_dst_iter
(dnnl::primitive_desc_base::diff_dst_desc(1
)), if useddiff_dst_iter_c
(dnnl::primitive_desc_base::diff_dst_desc(2
)), if usedworkspace
(dnnl::primitive_desc_base::workspace_desc(0
))Outputs:
diff_src_layer
(dnnl::primitive_desc_base::diff_src_desc(0
))diff_src_iter
(dnnl::primitive_desc_base::diff_src_desc(1
)), if useddiff_src_iter_c
(dnnl::primitive_desc_base::diff_src_desc(2
)), if useddiff_weights_layer
(dnnl::primitive_desc_base::diff_weights_desc(0
))diff_weights_iter
(dnnl::primitive_desc_base::diff_weights_desc(1
))diff_weights_peephole
(dnnl::primitive_desc_base::diff_weights_desc(2
)), if useddiff_bias
(dnnl::primitive_desc_base::diff_weights_desc(2
)), if used and LSTM is without peepholediff_bias
(dnnl::primitive_desc_base::diff_weights_desc(3
)), if used and LSTM is with peepholeprop_kind | Propagation kind. Must be dnnl::prop_kind::backward. |
direction | RNN direction. See dnnl::rnn_direction for more info. |
src_layer_desc | Memory descriptor for the input vector. |
src_iter_desc | Memory descriptor for the input recurrent hidden state vector. |
src_iter_c_desc | Memory descriptor for the input recurrent cell state vector. |
weights_layer_desc | Memory descriptor for the weights applied to the layer input. |
weights_iter_desc | Memory descriptor for the weights applied to the recurrent input. |
weights_peephole_desc | Memory descriptor for the weights applied to the cell states (according to the Peephole LSTM formula). |
bias_desc | Bias memory descriptor. |
dst_layer_desc | Memory descriptor for the output vector. |
dst_iter_desc | Memory descriptor for the output recurrent hidden state vector. |
dst_iter_c_desc | Memory descriptor for the output recurrent cell state vector. |
diff_src_layer_desc | Memory descriptor for the diff of input vector. |
diff_src_iter_desc | Memory descriptor for the diff of input recurrent hidden state vector. |
diff_src_iter_c_desc | Memory descriptor for the diff of input recurrent cell state vector. |
diff_weights_layer_desc | Memory descriptor for the diff of weights applied to the layer input. |
diff_weights_iter_desc | Memory descriptor for the diff of weights applied to the recurrent input. |
diff_weights_peephole_desc | Memory descriptor for the diff of weights applied to the cell states (according to the Peephole LSTM formula). |
diff_bias_desc | Diff bias memory descriptor. |
diff_dst_layer_desc | Memory descriptor for the diff of output vector. |
diff_dst_iter_desc | Memory descriptor for the diff of output recurrent hidden state vector. |
diff_dst_iter_c_desc | Memory descriptor for the diff of output recurrent cell state vector. |
flags | Unused. |
|
inline |
Constructs an LSTM descriptor for backward propagation using prop_kind
, direction
, and memory descriptors.
The src_iter_desc
together with diff_iter_desc
, src_iter_c_desc
together with src_iter_c_desc
, bias_desc
together with diff_bias_desc
, dst_iter_desc
together with diff_dst_iter_desc
, and dst_iter_c_desc
together with diff_dst_iter_c_desc
, may point to a zero memory descriptor. This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead.
format_tag
.Inputs:
src_layer
(dnnl::primitive_desc_base::src_desc(0
))src_iter
(dnnl::primitive_desc_base::src_desc(1
)), if usedsrc_iter_c
(dnnl::primitive_desc_base::src_desc(2
)), if usedweights_layer
(dnnl::primitive_desc_base::weights_desc(0
))weights_iter
(dnnl::primitive_desc_base::weights_desc(1
))bias
(dnnl::primitive_desc_base::weights_desc(2
)), if useddst_layer
(dnnl::primitive_desc_base::dst_desc(0
))dst_iter
(dnnl::primitive_desc_base::dst_desc(1
)), if useddst_iter_c
(dnnl::primitive_desc_base::dst_desc(2
)), if useddiff_dst_layer
(dnnl::primitive_desc_base::diff_dst_desc(0
))diff_dst_iter
(dnnl::primitive_desc_base::diff_dst_desc(1
)), if useddiff_dst_iter_c
(dnnl::primitive_desc_base::diff_dst_desc(2
)), if usedworkspace
(dnnl::primitive_desc_base::workspace_desc(0
))Outputs:
diff_src_layer
(dnnl::primitive_desc_base::diff_src_desc(0
))diff_src_iter
(dnnl::primitive_desc_base::diff_src_desc(1
)), if useddiff_src_iter_c
(dnnl::primitive_desc_base::diff_src_desc(2
)), if useddiff_weights_layer
(dnnl::primitive_desc_base::diff_weights_desc(0
))diff_weights_iter
(dnnl::primitive_desc_base::diff_weights_desc(1
))diff_bias
(dnnl::primitive_desc_base::diff_weights_desc(2
)), if usedprop_kind | Propagation kind. Must be dnnl::prop_kind::backward. |
direction | RNN direction. See dnnl::rnn_direction for more info. |
src_layer_desc | Memory descriptor for the input vector. |
src_iter_desc | Memory descriptor for the input recurrent hidden state vector. |
src_iter_c_desc | Memory descriptor for the input recurrent cell state vector. |
weights_layer_desc | Memory descriptor for the weights applied to the layer input. |
weights_iter_desc | Memory descriptor for the weights applied to the recurrent input. |
bias_desc | Bias memory descriptor. |
dst_layer_desc | Memory descriptor for the output vector. |
dst_iter_desc | Memory descriptor for the output recurrent hidden state vector. |
dst_iter_c_desc | Memory descriptor for the output recurrent cell state vector. |
diff_src_layer_desc | Memory descriptor for the diff of input vector. |
diff_src_iter_desc | Memory descriptor for the diff of input recurrent hidden state vector. |
diff_src_iter_c_desc | Memory descriptor for the diff of input recurrent cell state vector. |
diff_weights_layer_desc | Memory descriptor for the diff of weights applied to the layer input. |
diff_weights_iter_desc | Memory descriptor for the diff of weights applied to the recurrent input. |
diff_bias_desc | Diff bias memory descriptor. |
diff_dst_layer_desc | Memory descriptor for the diff of output vector. |
diff_dst_iter_desc | Memory descriptor for the diff of output recurrent hidden state vector. |
diff_dst_iter_c_desc | Memory descriptor for the diff of output recurrent cell state vector. |
flags | Unused. |