A fully connected neural network, also called a densely connected network, stacks Dense layers whose units connect to every unit in the adjacent layer. It processes vector data without assuming a particular feature structure, making it a practical baseline for tabular and structured data. section 20.1.6
Table 20.1 Model architectures for different data types
|
Input
|
Output
|
Model
|
|---|---|---|
|
Vector data
|
Class probability, regression value
|
Densely connected network
|
|
Timeseries data
|
Class probability, regression value
|
RNN, Transformer
|
|
Images
|
Class probability, regression value
|
Convnet
|
|
Text
|
Class probability, regression value
|
Transformer
|
|
Text, images
|
Text
|
Transformer
|
|
Text, images
|
Images
|
VAE, diffusion model
|
Use the architecture table to match fully connected networks with vector inputs and classification or regression outputs, then compare them with modality-specific alternatives. section 20.1.6
Choose the output layer and loss according to the prediction task:
- Binary classification: one sigmoid unit with binary crossentropy. section 20.1.6
- Single-label categorical classification: one softmax unit per class with categorical crossentropy. section 20.1.6
- Multilabel classification: one sigmoid unit per class with binary crossentropy. section 20.1.6
- Regression: use an output layer without an activation and mean squared error. section 13.2.3
A simple forecasting baseline
For Jena temperature forecasting, reshape each input sequence into a vector, pass it through Dense(16, activation = "relu") and Dense(1), then compile with Adam, MSE, and MAE. Save the best validation model and evaluate it on the test set. This inexpensive model provides a baseline before trying recurrent networks. section 13.2.3
Dense connectivity can represent relationships between any pair of input features, unlike convolutional layers that emphasize local relationships. That flexibility is useful when features have no known spatial or sequential structure, but it can be a poor choice when the data demands a stronger architecture prior. section 20.1.6 section 5.3.2

