Neural Network python from scratch | MultiClass Classification with Softmax

Learn With Jay · Beginner ·🧬 Deep Learning ·5y ago

About this lesson

Implement Neural Network in Python from Scratch ! In this video, we will implement MultClass Classification with Softmax by making a Neural Network in Python from Scratch. We will not use any build in models, but we will understand the Mathematics and Code behind the Neural Network in Python. ➖➖➖➖IMPORTANT NOTE➖➖➖➖ I made a small mistake while typing the code for derivative_tanh(x) function. ✔ The correct code will be : def derivative_tanh(x): return 1 - np.power(np.tanh(x), 2) ❌ And not: def derivative_tanh(x): return 1 - np.power(x, 2) I have explained it in this video at 19:05 : https://www.youtube.com/watch?v=URJ9pP1aURo&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD&index=5 ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 📕 Download the ASSIGNMENT and Implementation Code : https://github.com/Coding-Lane/Neural-Network---MultiClass-Classifcation-with-Softmax ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ ✔ Complete Neural Network Playlist : https://www.youtube.com/watch?v=mlk0rddP3L4&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 📕 LEARNINGS : Why did Cost increased at the beginning of training the model? ✔ Answer : It is because our weights W were very large. We multiplied 0.01 with them, but still it was not enough. ✔ Solution : Multiply 0.001 with weights W, instead of 0.01. You will that problem will be solved and you will have a steady decreasing cost function. There are many weight initialization techniques in Deep Learning to solve such problems and more. We will discuss them in the upcoming videos. We will see why is it necessary to initialize weights randomly and not with zeros. And also why weights need to be small ! ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ ✔ How Neural Network works ? : https://www.youtube.com/watch?v=mlk0rddP3L4&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD&index=1 ✔ Forward and Backpropagation in Neural Network : https://www.youtube.com/watch?v=Tb23YtZ92AE&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD&index=2 ✔ Activation Functions in Neural Network : https://www.youtube.com/watch?v=Y9qdKsOHRjA

Original Description

Implement Neural Network in Python from Scratch ! In this video, we will implement MultClass Classification with Softmax by making a Neural Network in Python from Scratch. We will not use any build in models, but we will understand the Mathematics and Code behind the Neural Network in Python. ➖➖➖➖IMPORTANT NOTE➖➖➖➖ I made a small mistake while typing the code for derivative_tanh(x) function. ✔ The correct code will be : def derivative_tanh(x): return 1 - np.power(np.tanh(x), 2) ❌ And not: def derivative_tanh(x): return 1 - np.power(x, 2) I have explained it in this video at 19:05 : https://www.youtube.com/watch?v=URJ9pP1aURo&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD&index=5 ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 📕 Download the ASSIGNMENT and Implementation Code : https://github.com/Coding-Lane/Neural-Network---MultiClass-Classifcation-with-Softmax ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ ✔ Complete Neural Network Playlist : https://www.youtube.com/watch?v=mlk0rddP3L4&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 📕 LEARNINGS : Why did Cost increased at the beginning of training the model? ✔ Answer : It is because our weights W were very large. We multiplied 0.01 with them, but still it was not enough. ✔ Solution : Multiply 0.001 with weights W, instead of 0.01. You will that problem will be solved and you will have a steady decreasing cost function. There are many weight initialization techniques in Deep Learning to solve such problems and more. We will discuss them in the upcoming videos. We will see why is it necessary to initialize weights randomly and not with zeros. And also why weights need to be small ! ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ ✔ How Neural Network works ? : https://www.youtube.com/watch?v=mlk0rddP3L4&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD&index=1 ✔ Forward and Backpropagation in Neural Network : https://www.youtube.com/watch?v=Tb23YtZ92AE&list=PLuhqtP7jdD8CftMk831qdE8BlIteSaNzD&index=2 ✔ Activation Functions in Neural Network : https://www.youtube.com/watch?v=Y9qdKsOHRjA
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related AI Lessons

Want to get started with deep learning
Get started with deep learning by leveraging resources like Andrew Karpathy's playlist and frameworks such as TensorFlow or PyTorch
Reddit r/deeplearning
Building a Deepfake Detector From Scratch — What Nobody Tells You
Learn to build a deepfake detector from scratch and understand the challenges involved in detecting AI-generated fake media
Medium · Deep Learning
Unfolding the Meandering Path: High-Dimensional Invariance and the Flat 2D Plane of Neural…
Learn about high-dimensional invariance and its relation to the flat 2D plane of neural networks, and how to apply these concepts to improve model performance
Medium · Deep Learning
Implementing Neural Style Transfer from Scratch: The Project That Started It All
Learn to implement Neural Style Transfer from scratch and understand its significance in deep learning
Medium · Deep Learning
Up next
Image Classification with ml5.js
The Coding Train
Watch →