I`m beggener in time series neural networks "LSTM" , I'm using it with pythonnet in visual studio, but I've tried a lot in training to no avail where the accuracy never increases , it's very small and loss function is nan . Is this from data or network architecture ? anyone can help ?
var trainx_data_numpy = data.trainX.reshape(218 , 201 , 1 );
var trainY_data_numpy = data.trainY.reshape(218, 201, 1);
var model = new Sequential();
model.Add(new LSTM(128, activation: "relu", input_shape: new Shape(
data.inputDimention.FD,
data.inputDimention.SD)
, return_sequences: true
));
model.Add(new Dropout(0.6));
model.Add(new LSTM(128 , return_sequences: true));
model.Add(new Dropout(0.6));
model.Add(new LSTM(128));
model.Add(new Dense(1));
model.Compile(optimizer: "adam" , loss: "mse", metrics: new string[] { "accuracy" });
var result = model.Fit(trainx_data_numpy,
trainY_data_numpy, batch_size: 1,
epochs: 10, verbose: 1 , validation_split:0.1f);