File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ def init_weights(shape):
3232
3333
3434def model (X , W , B , lstm_size ):
35- # X, input shape: (batch_size, input_vec_size, time_step_size )
35+ # X, input shape: (batch_size, time_step_size, input_vec_size )
3636 XT = tf .transpose (X , [1 , 0 , 2 ]) # permute time_step_size and batch_size
37- # XT shape: (input_vec_size, batch_szie, time_step_size )
38- XR = tf .reshape (XT , [- 1 , lstm_size ]) # each row has input for each lstm cell (lstm_size)
39- # XR shape: (input vec_size, batch_size)
37+ # XT shape: (time_step_size, batch_size, input_vec_size )
38+ XR = tf .reshape (XT , [- 1 , lstm_size ]) # each row has input for each lstm cell (lstm_size=input_vec_size )
39+ # XR shape: (time_step_size * batch_size, input_vec_size )
4040 X_split = tf .split (0 , time_step_size , XR ) # split them to time_step_size (28 arrays)
4141 # Each array shape: (batch_size, input_vec_size)
4242
You can’t perform that action at this time.
0 commit comments