From 2ef07413b78fd00c2e99b21a4e0dc63fa51a4920 Mon Sep 17 00:00:00 2001 From: Leighton Choi <954865397@qq.com> Date: Tue, 24 Nov 2020 15:53:31 +0800 Subject: [PATCH] Add LSTM and softmax to operators.md (#2346) * Add LSTM and softmax to operators.md * Fix lowercase and support_inplace --- docs/developer-guide/operators.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/developer-guide/operators.md b/docs/developer-guide/operators.md index af0b1f81b..1bc712122 100644 --- a/docs/developer-guide/operators.md +++ b/docs/developer-guide/operators.md @@ -7,6 +7,8 @@ * [concat](#concat) * [convolution](#convolution) * [dequantize](#dequantize) +* [lstm](#lstm) +* [softmax](#softmax) # absval ``` @@ -133,3 +135,32 @@ y = activation(x3, act_type, act_params) |1|bias_term|int|0| |2|bias_data_size|int|0| +# lstm +Apply a single-layer LSTM to a feature sequence of `T` timesteps. The input blob shape is `[w=input_size, h=T]` and the output blob shape is `[w=num_output, h=T]`. + +* one_blob_only + +|param id|name|type|default|description| +|--|--|--|--|--| +|0|num_output|int|0|hidden size of output| +|1|weight_data_size|int|0|total size of IFOG weight matrix| +|2|direction|int|0|0=forward, 1=reverse, 2=bidirectional| + +|weight|type|shape|description| +|--|--|--|--|--|--| +|weight_xc_data|float|`[w=input_size, h=num_output * 4, c=num_directions]`|| +|bias_c_data|float|`[w=num_output, h=4, c=num_directions]`|| +|weight_hc_data|float|`[w=num_output, h=num_output * 4, c=num_directions]`|| + +# softmax +``` +softmax(x, axis) +``` + +* one_blob_only +* support_inplace + +|param id|name|type|default|description| +|--|--|--|--|--| +|0|axis|int|0|| +|1|fixbug0|int|0|hack for bug fix, should be 1|