KWoC’20 Project Report

Anshul Sharma
4 min readJan 9, 2021

This is the final report of my contributions to KWoC’20.

About KWoC

Home page of KWoC-2020
Homepage of KWoC’20

Kharagpur Winter of Code is a 5-week long online program for students who are new to open source software development. KWoC provides you an excellent opportunity to get accustomed to Github and Git commands. It can help alleviate the normal lack of confidence regarding open source. I got to know about KWoC in my first year but I lacked the confidence to contribute because I thought that I need to know a lot in terms of DS/Algo and what not. Trust me, it is not always the case with open source.

“In real open source, you have the right to control your own destiny.” ~ Linus Torvalds

Selecting Projects

I started taking an interest in Deep Learning, so I wanted to brush up my skills in the field. I have learned Keras, Tensorflow, and PyTorch that’s why I chose the project AI Bias over others as it involved all three of them. I mainly worked on AI Bias but I made my first PR to Precision-Farming. Then I switched to the former one.

About AI Bias

The aim of this project is to classify the income category of people in a binary fashion as per their attributes. Next, we try to find out the factors which have contributed to the output of our model, at every layer, using a technique called Layerwise Relevance Propagation (LRP). There are three variants of this project using Keras, TensorFlow, PyTorch respectively. Since LRP is supported by Keras with Theano backend, I worked on kmain.py. The project also generates heatmaps for various layers against the input using the Keras variant.

First PR

I started my journey with KWoC with my first contribution to the project Precision-Farming. It just involved removing a link in the index page of the project. After this, I decided to move on to AI Bias as I found it more interesting to contribute.

Contributing to AI Bias

I started with making a fork of the repo. I mainly worked on this project using Google Colab as it provides GPU support for free (I later got to know that the particular dataset can be trained quite fast on CPU too 😅).

First Pull Request to AI Bias

This PR tried to solve the issues with readme.md and model accuracy. I worked on changing the readme.md to make it more detailed. I explained the code, the process to implement LRP, and explained what LRP is.

Explanation of Code in Readme.md

The major contribution of this PR is the increased accuracy of the model. I performed an ablation study to find the best model. I experimented with around 10 models, added more layers, experimented with Activation functions, and studied the effect of Regularization on test accuracy. The best model has a test accuracy of 81.78%, a 4.9% increment from the original 76.80%. Then I also changed some code to change the filename of saved numpy vectors to have consistency with model layer indexes. But I forgot to do random initialization using seed, because of that the model couldn't be reproduced. I will try to solve this in future PR.

Ablation Study

Second Pull Request to AI Bias

This PR solved the issue of modularising the Keras variant file. I made some new functions and added their docstrings. This included a function to load the data set and an option to choose between training and testing. The main change done in kmain.py was adding a function to perform LRP with a custom layer index.

Function for LRP

I made a total of 15 commits to the project.

My Thoughts

I am a beginner with open source but I decided to contribute to KWoC’20 as I wanted to explore this field and gain some experience. The decision was worth every bit of my time and energy. My experience with KWoC’20 has been excellent. I wish I could have contributed more. I would like to thanks the KOSS team for conducting the program smoothly and for solving any issues faced by any of us quite fast. I will suggest beginners to definitely participate in KWoC as it will provide you with the best platform to enhance and sharpen your skills.

I would like to thank my mentor Sayan Sinha [Github username: americast] for providing wonderful feedback throughout the coding period. You are awesome!

After my experience with KWoC’20, I will work on enhancing my skills further and I am looking forward to contributing more to Open Source.

Links to Pull Requests

--

--

Anshul Sharma
0 Followers

Sophomore @ IIT Kharagpur. I love Python