# Number of units in fully connected layers [duplicate]

I would like to build a fully-connected network for classifying three classes. As input I have two feature sets. One feature set with 100 features and another feature set with 1000 features. The input features consists of temporal and frequency features from smartphone accelerometer and gyroscope readings. The three classes correspond to three activity patterns.

I thought about designing the neural network as follows:

input: 100 features
layer 1: 50 units
batch normalization
relu activation
dropout
layer 2: 25 units
batch normalization
relu activation
dropout
layer 3: 13 units
batch normalization
relu activation
dropout
output: 3 classes

input: 1000 features
layer 1: 500 units
batch normalization
relu activation
dropout
layer 2: 250 units
batch normalization
relu activation
dropout
layer 3: 125 units
batch normalization
relu activation
dropout
output: 3 classes


Does this design make sense or is it better to have the units constant in each layer or even growing the number of units for a start?

• Better for what? Usually, "better" is determined by how the model performs against the task as measured on some hold-out data. Which of these models is the best against your holdout data?
– Sycorax
Mar 4 at 1:18
• @Sycorax Better in terms of performance. The problem is that I cannot test all configurations (number of units, layers etc.). That's why I would like to have a good starting point which makes sense. Mar 4 at 13:42
• No one does, but you've only outlined 2 configurations here.
– Sycorax
Mar 4 at 14:59
• @Sycorax A rule of thumb is to use as the average number of units half of the input dimension. But is it usually better to decrease the number of units from layer to layer or to keep it constant or to increase it? Mar 4 at 15:14