0
$\begingroup$

enter image description here

enter image description here

As you can see in above images I need to model Bi-GRUs stacked as shown in table which takes input (N,1,64) and outputs (N,204). The input data is binary number stream and so is output data. Can anyone please help me get started?

Thank you.

$\endgroup$
  • $\begingroup$ In general, Bi-GRU refers to "Bidirectional GRU". The architecture you show here does not seem to be bidirectional, so "Stacked GRU" or "2-layer GRU" would be more appropriate. $\endgroup$ – Adam Oudad Aug 4 at 21:36
0
$\begingroup$
from keras.layers import LSTM
from keras.models import Sequential
from keras.layers import LSTM
from keras.layers import Dense,BatchNormalization
model = Sequential()
model.add(LSTM(800, return_sequences=True,
               input_shape=(1, 64)))  # returns a sequence of vectors of dimension 32
model.add(BatchNormalization())  # returns a sequence of vectors of dimension 32
model.add(LSTM(800))  # return a single vector of dimension 32
model.add(BatchNormalization())
model.add(Dense(204, activation='sigmoid'))

model.compile(loss='binary_crossentropy', optimizer='Adam',metrics=['accuracy'])


model.summary()

I figured it out on my own.

| improve this answer | |
$\endgroup$
  • $\begingroup$ This is a simple LSTM, not a bidirectional GRU. This model is not the one you're looking for $\endgroup$ – Leevo Aug 10 '19 at 7:42
  • $\begingroup$ Right. I would put bidirectional clause in there. $\endgroup$ – Sank_BE Aug 11 '19 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.