{"id":13564838,"url":"https://github.com/thtrieu/essence","last_synced_at":"2025-07-29T06:04:42.120Z","repository":{"id":73034373,"uuid":"76983755","full_name":"thtrieu/essence","owner":"thtrieu","description":"AutoDiff DAG constructor, built on numpy and Cython. A Neural Turing Machine and DeepQ agent run on it. Clean code for educational purpose.","archived":false,"fork":false,"pushed_at":"2020-02-27T16:44:03.000Z","size":20308,"stargazers_count":77,"open_issues_count":0,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-09T16:46:47.817Z","etag":null,"topics":["auto-differentiation","cartpole","computational-graphs","convolutional-networks","convolutional-neural-networks","deep-learning","deep-q-network","dropout","lenet","lstm","lstm-model","machine-learning","mnist","neural-turing-machines","question-answering","recurrent-neural-networks","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thtrieu.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}},"created_at":"2016-12-20T19:00:54.000Z","updated_at":"2025-03-17T11:57:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bca30eb-6782-467b-be39-632235982424","html_url":"https://github.com/thtrieu/essence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thtrieu/essence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thtrieu%2Fessence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thtrieu%2Fessence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thtrieu%2Fessence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thtrieu%2Fessence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thtrieu","download_url":"https://codeload.github.com/thtrieu/essence/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thtrieu%2Fessence/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267638767,"owners_count":24119764,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["auto-differentiation","cartpole","computational-graphs","convolutional-networks","convolutional-neural-networks","deep-learning","deep-q-network","dropout","lenet","lstm","lstm-model","machine-learning","mnist","neural-turing-machines","question-answering","recurrent-neural-networks","reinforcement-learning"],"created_at":"2024-08-01T13:01:36.771Z","updated_at":"2025-07-29T06:04:42.100Z","avatar_url":"https://github.com/thtrieu.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"*What I cannot create, I do not understand - Richard Feynman*\n\n### essence\n\nA directed acyclic computational graph builder, built from scratch on `numpy` and `C`, including auto-differentiation.\n\nThis was not *just another deep learning library*, its minimal code base was supposed to demonstrate how to:\n\n* Build neural net modules.\n* Put the modules together.\n* Efficiently compute gradients from this design.\n\n### Demos\n\n- `mnist-mlp.py`: Depth-2 multi layer perceptron, with ReLU and Dropout; 95.3% on MNIST.\n\n- `lenet-bn.py`: LeNet with Batch Normalization on first layer, 97% on MNIST.\n\n- `lstm-embed.py`: LSTM on word embeddings for Vietnamese Question classification + Dropout + L2 weight decay. 85% on test set and 98% on training set (overfit).\n\n- `turing-copy.py`: A neural turing machine with LSTM controller. Test result on copy task length 70:\n\n![img](turing.png)\n\n- `visual-answer.py`. Visual question answering with *pretrained* weight from VGG16 and a stack of 3 basic LSTMs, on Glove word2vec.\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"test.jpg\"/\u003e \u003c/p\u003e\n\n```\nQ: What is the animal in the picture?      . A: cat\nQ: Is there any person in the picture?     . A: no\nQ: What is the cat doing?                  . A: sitting\nQ: Where is the cat sitting on?            . A: floor\nQ: What is the cat color?                  . A: white\nQ: Is the cat smiling?                     . A: yes\n```\n\n- `dqn-cartpole.py`: A classic solved with DQN, with experience replay and target network ofcourse. (Illustration below is one-take)\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"demo_cartpole.gif\"/\u003e \u003c/p\u003e\n\n**TODO**: Memory network and GAN, for that I need to improve my speed of `im2col` and `gemm` for `conv` module first.\n\n### License\nGPL 3.0 (see License in this repo)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthtrieu%2Fessence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthtrieu%2Fessence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthtrieu%2Fessence/lists"}