File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1199,9 +1199,12 @@ def lstm_unit(x_t,
11991199 This layer has two outputs including :math:`h_t` and :math:`o_t`.
12001200
12011201 Args:
1202- x_t (Variable): The input value of current step, a 2-D tensor.
1203- hidden_t_prev (Variable): The hidden value of lstm unit, a 2-D tensor.
1204- cell_t_prev (Variable): The cell value of lstm unit, a 2-D tensor.
1202+ x_t (Variable): The input value of current step, a 2-D tensor with shape
1203+ M x N, M for batch size and N for input size.
1204+ hidden_t_prev (Variable): The hidden value of lstm unit, a 2-D tensor
1205+ with shape M x S, M for batch size and S for size of lstm unit.
1206+ cell_t_prev (Variable): The cell value of lstm unit, a 2-D tensor with
1207+ shape M x S, M for batch size and S for size of lstm unit.
12051208 forget_bias (float): The forget bias of lstm unit.
12061209 param_attr (ParamAttr): The attributes of parameter weights, used to set
12071210 initializer, name etc.
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ def test_lstm_unit(self):
177177 name = 'x_t_data' , shape = [10 , 10 ], dtype = 'float32' )
178178 x_t = layers .fc (input = x_t_data , size = 10 )
179179 prev_hidden_data = layers .data (
180- name = 'prev_hidden_data' , shape = [10 , 20 ], dtype = 'float32' )
181- prev_hidden = layers .fc (input = prev_hidden_data , size = 20 )
180+ name = 'prev_hidden_data' , shape = [10 , 30 ], dtype = 'float32' )
181+ prev_hidden = layers .fc (input = prev_hidden_data , size = 30 )
182182 prev_cell_data = layers .data (
183183 name = 'prev_cell' , shape = [10 , 30 ], dtype = 'float32' )
184184 prev_cell = layers .fc (input = prev_cell_data , size = 30 )
You can’t perform that action at this time.
0 commit comments