July 2, 2026
Deep Learning (for Audio) with Python Course Notes
Deep Learning
This resource is from valeriovelardo.com
Video 6
The below code snippet creates a basic Multilayer Perceptron Class.
What is an MLP?
A multi-layer perceptron is a foundational type of Feedforward Artificial Neural Network (NN). There are several types of NN's and the feedforward NN passes data linearly in one direction to generate output from a certain set of inputs and they have no loops.
The below code is a basic implementation of the functioning of an MLP.
The NumPy library, which is the prominent library for scientific computing especially in ML, is imported.
A class containing three functions is written serving the network's construction, activation, and feedforward pass.
To save space, the complete object-oriented implementation utilizing key NumPy operations like np.dot and np.random.randn can be found on GitHub:
The output of the MLP is a list of two elements which are in the range of 0 to 1. The reason for this is the sigmoid function. A sigmoid function is any function that has a mathematical curve of "S" shape.
Sigmoidal functions enable the model to perform non-linear classification of data that couldn't be classified by a simple straight line:
Since the exponential term is always positive, the denominator is always greater than 1, ensuring that the output always stays between 0 and 1.
What does the output signify here if the data is audio?
One simplistic yet practical application of the above code is: three inputs do signify three features of an audio and the two output maps if the audio is Speech or Music.
This is a classic example of Supervised Learning.