Open waqarkaleemkhan opened 3 years ago
@YifanDengWHU I did find out the x_train, y_train_one_hot, x_test, y_test_one_hot which are below so now what I need is that what will be the input shape for LSTMs or RNN can you please help x_train shape (29790, 1144) y_train_one_hot (29790, 65) x_test shape (7474, 1144) y_test_one_hot shape (7474, 65)
In an RNN, the input shape will be 3D. For example, (batch_size, time_step, feature_dimension), while I don't think RNN can't be directly applied to the data here.
@YifanDengWHU Yes I know that in Rnn we have a 3D input shape that’s why I need a little help from you that in your code where should I apply changes
Since there isn't any sequence-like data in my dataset, it's unlikely to apply changes directly. Maybe you can refer to https://github.com/kexinhuang12345/DeepPurpose to see how they perform CNN_RNN in the SMILES of drugs.
Hi @YifanDengWHU hope you will be doing well I want to try LSTM or RNN on your dataset using your feature extractions methods I did change the DNN function in your code but throw an error of input shapes can you please help me a little what will be input shapes for LSTMs or RNN I am pasting the updated DNN function code below thanks. I did try by my self to find out the shapes but because of my laptop specs, I did take a lot of time. def DNN(): train_input=Input(shape=(vector_size*2,),name='Inputlayer') train_in=LSTM(512)(train_input) train_in=BatchNormalization()(train_in) train_in=Dropout(droprate)(train_in) train_in=LSTM(256)(train_in) train_in=BatchNormalization()(train_in) train_in=Dropout(droprate)(train_in) train_in=Dense(event_num)(train_in) out=Activation('softmax')(train_in) model=Model(input=train_input,output=out) model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) return model