keras-extra
keras-extra copied to clipboard
LSTM is not showing accuracy on traring ==
Hi,
I am trying to train LSTM, but while training accuracy remains zero in each epoch. I have transformed data to multivariate Time-series data and also shape in three-dimensional shape. I also have normalised data using minmaxsaller.
I have tried on a number of the epoch from 5 to 50 and batch size from 25 to 200. I have tried data samples from 1000000 to 1000 but none is working.
Every time I am getting training accuracy zero only.
Can anyone help me in understanding it or suggest some more experiments.
Following is my network.
from keras.layers.core import Dense,Activation,Dropout from keras.layers.recurrent import LSTM from keras.models import Sequential from keras.layers import Flatten
model = Sequential() model.add(LSTM(50,return_sequences=True, input_shape=(X_train_values.shape[1], X_train_values.shape[2]))) model.add(Dropout(0.2))
model.add(Flatten()) model.add(Dense(1))
model.add(Activation('linear')) model.compile(loss='mse',optimizer='rmsprop',metrics=['accuracy'])
history = model.fit(X_train_values, y_train.values,epochs=25, batch_size=30, verbose=2, shuffle=False)