healthDataScience / deep-learning-HAR

Convolutional and LSTM networks to classify human activity
456 stars 239 forks source link

Regards LSTM #2

Closed ngjiawaie closed 7 years ago

ngjiawaie commented 7 years ago

Hi, i would like to ask for your LSTM so what is your initial input length? and for every iteration within the LSTM from your picture, stated with 128steps what does the 27 for each loop for?

and you stacked 2 LSTM cells if im not mistaken. so how do you from input length of 9 jump into LSTM with input of 27?

Sorry that im kind of new to LSTM and stacked LSTM. Do you mind to explain how it works?

Do you mind to explain this part below.


lstm_in = tf.transpose(inputs_, [1,0,2]) # reshape into (seq_len, N, channels)
lstm_in = tf.reshape(lstm_in, [-1, n_channels]) # Now (seq_len*N, n_channels)

lstm_in = tf.layers.dense(lstm_in, lstm_size, activation=None) 
lstm_in = tf.split(lstm_in, seq_len, 0)
lstm = tf.contrib.rnn.BasicLSTMCell(lstm_size)
drop = tf.contrib.rnn.DropoutWrapper(lstm, output_keep_prob=keep_prob_)
cell = tf.contrib.rnn.MultiRNNCell([drop] * lstm_layers)
initial_state = cell.zero_state(batch_size, tf.float32)

ngjiawaie commented 7 years ago

i get it alrdy.