{"id":15700188,"url":"https://github.com/arig23498/rnn_viz","last_synced_at":"2025-07-04T03:06:50.492Z","repository":{"id":109749949,"uuid":"297629606","full_name":"ariG23498/RNN_Viz","owner":"ariG23498","description":"Sequence models in Numpy","archived":false,"fork":false,"pushed_at":"2020-10-09T18:17:02.000Z","size":4827,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T13:12:11.601Z","etag":null,"topics":["backpropagation","lstm","numpy","recurrence-formula","rnn","wandb"],"latest_commit_sha":null,"homepage":"https://bit.ly/under_RNN","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ariG23498.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-22T11:37:49.000Z","updated_at":"2024-07-12T17:59:48.000Z","dependencies_parsed_at":"2023-05-14T18:30:16.385Z","dependency_job_id":null,"html_url":"https://github.com/ariG23498/RNN_Viz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ariG23498/RNN_Viz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariG23498%2FRNN_Viz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariG23498%2FRNN_Viz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariG23498%2FRNN_Viz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariG23498%2FRNN_Viz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ariG23498","download_url":"https://codeload.github.com/ariG23498/RNN_Viz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariG23498%2FRNN_Viz/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263437345,"owners_count":23466368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backpropagation","lstm","numpy","recurrence-formula","rnn","wandb"],"created_at":"2024-10-03T19:46:40.438Z","updated_at":"2025-07-04T03:06:50.464Z","avatar_url":"https://github.com/ariG23498.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How do the sequence models work?\n\n### Reports\n1. **[Under the hood of RNNs](http://bit.ly/under_RNN)**\n2. **[Under the hood of LSMTs](http://bit.ly/under_LSTM)**\n\n### Introduction\n\nThe code-base contains `Numpy` implementations of two sequence model architectures, a vanilla `Recurrent Neural Network` and a vanilla `Long Short Term Memory`. This repository is for those who want to know what happens under the hood of these architectures.\n\nIn the repository care is given to the `feed-froward` and `back-propagation` of the architectures. The derivations are unrolled as much as I could to make it understandable.\n\nThe goal is to tackle the problem of `character generation` using RNNs and LSTMs. While tackling the problem, we also look into the gradient flow of the architectures. Later on an experiment to show the `context understanding` is done too.\n\n### Problem Statement\n\nThe input will be a sequence of characters and the output would be the immediate next character in the sequence. The image below demonstrates the approach. The characters in a particular sequence are `H, E, L, L` and the next character is `O`. A little thing to notice here is that the character `O` could have been a `,` or simply a `\\n`. The character that is generated largely depends on the context of the sequence. A well-trained model would generate characters that fit the context very well.\n\n![Problem.png](https://api.wandb.ai/files/authors/images/projects/126026/643ae901.png)\n\n\u003cp align=\"center\"\u003eCharacter level language model\u003c/p\u003e\n\n### Feedforward\n\nWe look into the recurrence formula for both the architectures.\n\n![Recurrence RNN](https://api.wandb.ai/files/authors/images/projects/126026/982cd0e9.png)\n\n\u003cp align=\"center\"\u003eRecurrence formula of RNN\u003c/p\u003e\n\n![Recurrence LSTM](https://api.wandb.ai/files/authors/images/projects/126026/d8dc8d9d.png)\n\n\u003cp align=\"center\"\u003eRecurrence formula of LSTM\u003c/p\u003e\n\n### Backpropagation\n\nWe look into the backpropagation formula for both the architectures.\n\n![Back RNN GIF](https://api.wandb.ai/files/authors/images/projects/126026/f27234c0.gif)\n\n\u003cp align=\"center\"\u003eBackpropagation in RNN\u003c/p\u003e\n\n![LSTM_13.png](https://api.wandb.ai/files/authors/images/projects/126026/5f41651f.png)\n\n\u003cp align=\"center\"\u003eBackpropagation in LSTM\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farig23498%2Frnn_viz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farig23498%2Frnn_viz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farig23498%2Frnn_viz/lists"}