Hello all,
I am a very new user to Keras. I have a particular usecase I am a bit confused about. I am trying to use LSTM to predict a binary vector.
That is the input to the LSTM will be a (nsamples*ndim*lookback) series of values (0,1) and the output is a single binary vector of size ndim.
I have used the following LSTM code :
model = Sequential()
model.add(LSTM(HIDDEN_NEURONS, input_shape=(TIME_SLOTS,DIM) ) )
model.add(Dense(DIM, W_constraint = nonneg(), b_constraint=nonneg()))
model.add(Activation("linear"))
sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss='mean_squared_error', optimizer=sgd)
But now the outputs are basically floats between 0 and 1. Which is not exactly what I want. I want the input to be (0,0,0,1),(0,1,1,0),(0,1,0,0) and the output to be (1,0,0,1) ? Can anyone help me with this setup