0

For a regression task, I have sequences of training data and if I define the layers of deep neural network to be:

Layers=[ sequenceInputLayer(featuredimension) reluLayer dropoutLayer(0.05) fullyConnectedLayer(numResponse) regressionLayer]

Is it a valid deep neural network? Or do I need to add LSTM layer too?

DukeZhou
  • 6,237
  • 5
  • 25
  • 53
NM08
  • 9
  • 2

1 Answers1

1

Yes, it is a very common practice to use some RNN when your input data is a sequence. Besides, your network has some shape issue if your input data is 2D. You should, at least flatten your input data to a vector to be able to forward propagate to the dense layer, but instead of this use some kind of RNN. To the best of my knowledge, that dropout value doesn't good. It seems too low.

Molnár István
  • 694
  • 1
  • 7
  • 11
  • 1
    Thank you for helping. My training data is 1D and if I predict data using the above layers my prediction is 90% accurate. However, if I add LSTM layer after sequenceinputLayer, my accuracy suffers big time and I get a same predicted value no matter what sequence input do I use to predict. Can you suggest why is that? – NM08 May 23 '18 at 16:49
  • 1
    My Xtrain = 823x1 cell and each individual cell/sequence contains 9x1 double data. That is my features/predictors are 9 and there are total 823 observations. My Ytrain= 823x1 cell and It contains the response of each sequence. – NM08 May 23 '18 at 16:51
  • So, do you have 823 training points, where the input shape is (9,) and the output shape is (1,)? I am pretty sure about the (1,) because you do regression. – Molnár István May 24 '18 at 05:45
  • Yes that is so. – NM08 May 24 '18 at 10:26