DEV Community

vivek patel
vivek patel

Posted on • Updated on

From a Dumb Student to a PyTorch Contributor: The Impact of Teachers on My Life⚡

`I cannot teach anybody anything; I can only make them think.
- Socrates

Introduction

Teachers play an important role in shaping our lives, inspiring us to chase our dreams and guiding us through the learning process. In this post, I'll share a real-life story that illustrates the impact of teachers on my life and how it led me to contribute to an popular open-source project. I'll also discuss the challenges I faced in implementing a research algorithm in PyTorch and the dedication and hard work required to create a successful industry ready pull request. Finally, I'll reflect on the joy of seeing my pull request merged and the impact it can have on others. This post highlights the importance of learning from our mistakes, seeking help and feedback from the community, and recognizing the contributions of those who inspire us.

The inspiration behind contributing to open-source projects.

Back in school when I was a bot(dumb), I was in 3rd standard at JNP school Anawal where I spent my 8 years which were undoubtedly amazing, here is a conversation between my computer teacher(Nitin sir) and me.

Nitin sir:- "How do computers work? Vivek stand up and answer the question"

Vivek( nervous):- "um... Umm...."

Vivek again "1. input 2. output...ummmm 3.....processing"

(The whole class laughed)

Someone from right beside me( whispering):- it's, 1. input 2. processing 3. output, DUMBO.

(Again the whole class gave a howl of laughter )

Then even though I'd given the wrong answer, my sir again gave me an example of how flour mil works. I was a curious child from beginning as far as I can remember but I know that in that exact moment I developed a passion for computers. My sir again asked me the same question and this time, I corrected myself.

Teacher teaching

If you are planning for a year, sow rice; if you are planning for a decade, plant trees; if you are planning for a lifetime, educate people.
– Chinese Proverb

after 16 years of that incident, I'm still doing it wrong in the form of machine learning "1.input+3.output" -> "2.processing"-> 4.rules!!!!

just some days ago before my pull request got merged. my sir met me on the road I touched his feet, and my mind started recalling all those memories, it's still nothing for me to pay off what he taught me.

You can learn 3 things from my above real-life story:

  1. Making mistakes is a part of the learning process.

Just like Machine learning it's an important part to make mistakes and it is completely okay! ; ) either it's your model or you can't learn without doing mistakes.

  1. Teachers play an important role in shaping up our lives

even after 16 years, I'm still remembering this precious conversation. especially all my teachers reading this post I love you. I don't think I will be ever able to create this post and put a title on how my pull request got merged in Pytoch ; )

  1. Learning is a lifelong process and input+output = rules

After Nitin sir, I met many teachers thought this journey, in my school the first teacher I met who was holding a PhD was K.J Goswami, as far as I can recall he done his research in nitrogen rings. he introduced research word to me before that I didn't have a clue that the term research" exists, I would like to name few more teachers like Kinjal Mistree, Vishwajit Bakrola, Ankit Kharwar, and many more who taught me input+output = rules. and the fun part is I'm still learning incrementally. They encourage me and inspire me to push my limits.

The challenge of implementing a research algorithm in PyTorch.

Now let's back to the process that how you can contribute to an open-source project.

My personal challenges were:-

  1. I didn't know how to read and implement research paper.
  2. How to write industry ready code

Challenges I faced during implementation.

The first thing is just like any newbie I didn't know how to read any research paper. so I hopped on to youtube and searched how a research paper is written and how one can implement it. it took me 8 days to read the paper because it has many backlinks Geoffrey Hinton likes to add unimaginable words and memes(some of which were ridiculous) at the bottom of every page of the paper. so after 8 days, I learned many topics that helped me in the implementation of code. I've searched GitHub there are only 4 to 5 repositories that are implementing the same in TensorFlow/Keras no implementations in PyTorch. So I decided to create an issue in the pytorch/examples repository,

Vivek's issue

and luckily I got a reply from PyTorch founder Soumith Chintala is a Researcher at Facebook AI Research, where he works on high-performance deep learning.

reply from pytorch founder

So if I could break that into points it would be:-

  1. Understand that it will take time to read a paper especially when you are new
  2. Read abstract and conclusion in the first place
  3. If possible take notes and notedown math equations that are used in paper( it could be loss function, any transformation technique, ext...ext..)
  4. Highlight points in paper that you don't get

Tip:- (This is very common, If you don't get meaning of any sentence go through backlink provided at the bottom of the paper. Because they assumes that you have already have base knowledge of these papers)

Pro tip:- ( at the end of any research paper there is one section called 'future works', you can try to implement those projects and it would be nice fit for your resume.)

The dedication and hard work required to create a successful pull request.

When my friends are enjoying so-called "Sports Week ", I was the one who was sitting in E101 and trying and struggling to implement the whole code of the forward forward algorithm with my friend Jainaam. It took me 8 days to read the paper and a full month to create my implementation in PyTorch and still, my code was not optimal.

The importance of seeking help and feedback from the community.

After that I again searched on GitHub, that is there any code available luckily I came across Mohammad Pezeshki, Who is a researcher in the computer science field. his code was optimal so I sent an email to him about my issue and my pull request, luckily he responded affirmatively.

Just like movie Kabir Singh you need a best friend and you are average of five people surrounded by you. In my case jainaam helped me in building docs using reStructuredText and makefile.

The joy of seeing your pull request being merged and the impact it can have on others.

After some talk with my maintainer, he suggested some changes and explanations, I've again corrected my mistakes and updated my code accordingly. Then reviews after review, mistake after mistakes, commit after commits and corrections after correction from both ends.

Finally, on 27 Feb 2023, I received an email that my pull request is merged in PyTorch.

Pytorch merged

The cherry on top of the cake I've added my father's name at the top of the code in the comments. I hope that for the next upcoming 200-300 years, someone will read modify and improve or perform experiments with my code.(Vivek V patel), My code can be found at official PyTorch's Website https://pytorch.org/examples/(Image Classification Using Forward-Forward Algorithm)

I would Like to end this Blog with a quote

the person who goes to the gym every single day, regardless of how they feel, will always beat the person who goes to the gym when they feel like going to the gym.
-Unknown

Thanks for reading this far, you can sub to my email newsletter here and it's free(Don't worry I don't spam🤫🤫) vivekpatel.beehiiv.com

Top comments (7)

Collapse
 
devmehta profile image
Dev Mehta

Very well written!! Congratulations Vivek 👏🏻👏🏻👏🏻

Collapse
 
vivekcodes profile image
vivek patel

Thanks Dev 😄

Collapse
 
__masashi__ profile image
Masashi

Nice. I feel really motivated to keep going. Thanks for this article.

Collapse
 
vivekcodes profile image
vivek patel

Have a Nice day😄

Collapse
 
haaard_p profile image
Haard Parmar

Congratulations! You deserve all the success and happiness in the world. 👏🏻👏🏻👏🏻

Collapse
 
vivekcodes profile image
vivek patel

Thanks @haaard_p 😄

Collapse
 
vasuramani profile image
VasuRamani

Your hard work and perseverance have paid off. Congratulations bro ! 😄