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?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.Sign up to join this community
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.