<p>The inputs (features) and expected output for my ANN are these:</p>

<ul>
<li>Input 1: Product id (number, cast to double)</li>
<li>Input 2: Year in the past (1900..2017, cast to double)</li>
<li>Input 3: Month of year (1..12, cast to double)</li>
<li>Expected output: Sale of month (number of units sold, cast to double)</li>
</ul>

<p>I need to predict the sale of a product for a certain month in a certain year. <strong>How many layers and how many neurons on there layers should I put</strong>?</p>

CC BY-SA 3.0
2017-05-09T09:33:11.667Z
Figure it out through trial and error. You don't have a lot of inputs, so you should not make it to big. I think having two hidden layers is enough, with a maximum of 10 neurons per hidden layer. But what have you tried? Because you have such a small input/output it would be fairly easy to figure it out yourself through trial and error...
Thomas Wagenaar
CC BY-SA 3.0
2017-05-09T09:43:26.880Z
i have 12 training samples for the 12 months of last year * 1 product. I use this shape [10,10,1], but the training doesn't converge after 30,000,000 sample iterations
Dan D.
CC BY-SA 3.0
2017-05-09T09:48:02.103Z
Have you tried using an LSTM?
Thomas Wagenaar
CC BY-SA 3.0
2017-05-09T09:58:14.083Z
never tried LSTM before, may be because of something wrong in my own ANN code, i'll try some libraries
Dan D.
<neural-networks><ai-design><prediction><hidden-layers>
How many layers and neurons on the layers does a neural network need for for sales prediction?
Dan D.
# How many layers and neurons on the layers does a neural network need for for sales prediction?

(Asked by: username_0 on 2017-05-09)

The inputs (features) and expected output for my ANN are these:

* Input 1: Product id (number, cast to double)
* Input 2: Year in the past (1900..2017, cast to double)
* Input 3: Month of year (1..12, cast to double)
* Expected output: Sale of month (number of units sold, cast to double)

I need to predict the sale of a product for a certain month in a certain year. **How many layers and how many neurons on there layers should I put**?

**Tags:** neural-networks, ai-design, prediction, hidden-layers

> **Comments:**
> **username_1**: Figure it out through trial and error. You don't have a lot of inputs, so you should not make it to big. I think having two hidden layers is enough, with a maximum of 10 neurons per hidden layer. But what have you tried? Because you have such a small input/output it would be fairly easy to figure it out yourself through trial and error...  
> **username_0**: i have 12 training samples for the 12 months of last year * 1 product. I use this shape [10,10,1], but the training doesn't converge after 30,000,000 sample iterations  
> **username_1**: Have you tried using an LSTM?  
> **username_0**: never tried LSTM before, may be because of something wrong in my own ANN code, i'll try some libraries  

---

## 0 answers

