3 ms·
Neograd – A deep learning framework created from scratch using Python and NumPy
Hey everyone!
I released v0.0.2 of neograd, a deep learning framework created from scratch using Python and NumPy, with automatic differentiation capabilities. I’d taken for granted that I understood how convolutions work. Just implement a sliding window, perform element-wise multiplication, take its sum, sounds so simple right? Add to that - accounting for the running time of the algorithm, backward pass to get its gradients and convolutions over volumes, this turned out to be an excruciating undertaking.
This release includes:
- Gradient checking to check the correctness of gradients that are calculated by autograd
- Optimization algorithms like Momentum, RMSProp, and Adam
- 2D, 3D Convolution and 2D, 3D Pooling layers for Convolutional Neural Networks
- Save trained models, weights to disk and load them whenever required
- Add checkpoints while training the model
- Documentation hosted at https://neograd.readthedocs.io
Checkout the GitHub repo - https://github.com/pranftw/neograd
Explore the new features on Google Colab - https://colab.research.google.com/drive/1D4JgBwKgnNQ8Q5DpninB6rdFUidRbjwM?usp=sharing
https://colab.research.google.com/drive/184916aB5alIyM_xCa0qWnZAL35fDa43L?usp=sharing
- bjourne 4y agoWell done! The code is very clean and easy to read. I'll definitely recommend your library to people who want to learn how backprop works.
- pranftw 4y agoThanks a lot! Glad you liked it!
- usgroup 4y agoUseful context: “I firmly believe that in order to understand something completely, you have to build it on your own from scratch. I used to do gradient calculation analytically, and thought that autograd was some kind of magic. So this was initially built to understand autograd but later on its scope was extended. You might be wondering, there are already many frameworks like TensorFlow and PyTorch that are very popular, and why did I have to create another one? The answer is that these have very complex codebases that are difficult to grasp. So I intend that this repository be used as an educational tool in order to understand how things work under the hood in these giant frameworks, with code that is intuitive and easily readable.”