1
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ 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? $\endgroup$ – NM08 May 23 '18 at 16:49
  • 1
    $\begingroup$ 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. $\endgroup$ – NM08 May 23 '18 at 16:51
  • $\begingroup$ 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. $\endgroup$ – Molnár István May 24 '18 at 5:45
  • $\begingroup$ Yes that is so. $\endgroup$ – NM08 May 24 '18 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.