PyTorch RNN From Scratch

API, Code, ML, Python, PyTorch
PyTorch RNN From Scratch New to pyTorch, as usual, wanted to learn by doing things from scratch. Below are a few blogs that got me going.Number 1, really from scratchhttps://towardsdatascience.com/understanding-pytorch-with-an-example-a-step-by-step-tutorial-81fc5f8c4e8e?#3a3fImageRNN but it is using nn.RNN, I wanted even lower.. :)https://medium.com/dair-ai/building-rnns-is-fun-with-pytorch-and-google-colab-3903ea9a3a79PyTorch - Tutorial that set me thinking..but this is text classification not using Dataloader and batch processing, as I consider batching is tricky one to get going, so, I wanted to indulge on it ;)https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.htmlhttps://pytorch.org/tutorials/beginner/former_torchies/nnft_tutorial.html[code] import torchimport torch.nn as nn import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np [/code]Load the MNIST data[code] BATCH_SIZE = 64 # list all transformations transform = transforms.Compose( [transforms.ToTensor()]) # download and load training dataset trainset = torchvision.datasets.MNIST(root='./data', train=True, download=True, transform=transform) trainloader = torch.utils.data.DataLoader(trainset, batch_size=BATCH_SIZE,shuffle=True, num_workers=2,drop_last=True) # download and load testing…
Read More

Connecting volunteer and the needy using twitter

API
During the recent historical deluge, I was witnessing helplessly on the various social media networks, where volunteers looking for the victims and victims looking for various essentials from emergency rescue contacts to water, food and other supplies. Especially,  on the twitter both help and needs poured in and there were good Samaritans  like @rj_balaji, @Actor_Siddharth, FM Radio stations and  many others pitched in to bridge these two. But it was not easy to run through a large list, keep up-to-date, as prompt response was the need of the hour. I thought why not automate it and help mutually discover each other? that's how this twit_sos idea born, thought there could be one such app already,  scored the web but did not find any. I'm sure this may not be an unique idea nevertheless…
Read More