Search code examples
machine-learningdeep-learningneural-networkpytorchartificial-intelligence

Why are linear layers used in Binary Classification with Deep Learning?


In many examples of Binary Classification with Deep learning

Why are linear layers used? I've been trying to look around the internet for information on the reason for the use of linear layers

e.g.

https://github.com/StatsGary/PyTorch_Tutorials/blob/main/01_MLP_Thyroid_Classifier/PyTorch_Binary_From_Scratch.py

https://hutsons-hacks.info/building-a-pytorch-binary-classification-multi-layer-perceptron-from-the-ground-up


Solution

  • Linear layer is just another (a bit mathematically incorrect) name of a fully connected layer, the most standard, classic, and in some sense - powerful building block of neural networks. Networks built purely from fully connected layers are universal approximators, and thus a good starting point for any sort of investigation.