How did I learn Machine Learning : part 3 - Implement a simple neural network from scratch V

in #technology5 years ago (edited)

Hi,

In my previous post, I have presented you to derive the basic vectorized equations which are useful to create a simple neural network. I have mentioned those equations below.

eqn (10) : Z = WX + B
Here the dimensions of is 1*12288. In this way, we can write same equation which are quivalant to the equations we derived in previous posts.
eqn (11): Ŷ = g(Z)
eqn (12): J = np.sum(-Ylog(Ŷ) - (1 - Y)log(1 - Ŷ))
(Here the np.sum means adding the all elimants in the matrix.)
eqn (13): ∂W = (Ŷ - Y)XT/m
eqn (14): ∂B = np.sum(Ŷ - Y)/m
eqn (15): W = W -α∂W
eqn (16): B = B -α∂B

In this post, I present you the code implementation according to the above equations. You can find the code here. In this blog, I am not going to explain each line because I have added the necessary comments to the code. If you have any unclear point, please raise that. Also, I recommend you to implement the code on your own and compare it with my code.

In the next post, I will present you what is the learning rate and the effect of learning rate on the neural network.

Please feel free to raise any concerns/suggestions on this blog post. Let's meet in the next post.

My previous blogs,
How did I learn Machine Learning : part 1 - Create the coding environment
How did I learn Machine Learning : part 2 - Setup conda environment in PyCharm
How did I learn Machine Learning : part 3 - Implement a simple neural network from scratch I
How did I learn Machine Learning : part 3 - Implement a simple neural network from scratch II
How did I learn Machine Learning : part 3 - Implement a simple neural network from scratch III
How did I learn Machine Learning : part 3 - Implement a simple neural network from scratch IV

References:
cousera

Sort:  

Congratulations @boostyslf! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 10 as payout for your posts. Your next target is to reach a total payout of 50

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

@boostyslf, thank you for supporting @steemitboard as a witness.

Here is a small present to show our gratitude
Click on the badge to view your Board of Honor.

Once again, thanks for your support!

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 60913.71
ETH 2919.21
USDT 1.00
SBD 3.71