{"id":13454816,"url":"https://github.com/domluna/memn2n","last_synced_at":"2025-04-06T18:17:08.415Z","repository":{"id":149806392,"uuid":"47137092","full_name":"domluna/memn2n","owner":"domluna","description":"End-To-End Memory Network using Tensorflow","archived":false,"fork":false,"pushed_at":"2017-02-17T16:46:57.000Z","size":74,"stargazers_count":342,"open_issues_count":11,"forks_count":132,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-30T17:09:15.678Z","etag":null,"topics":["memory-networks","nlp","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/domluna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-11-30T18:16:37.000Z","updated_at":"2025-03-15T22:55:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3586dca-ec0e-4fce-95e6-c1fb740049c2","html_url":"https://github.com/domluna/memn2n","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domluna%2Fmemn2n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domluna%2Fmemn2n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domluna%2Fmemn2n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domluna%2Fmemn2n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/domluna","download_url":"https://codeload.github.com/domluna/memn2n/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526768,"owners_count":20953143,"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":["memory-networks","nlp","tensorflow"],"created_at":"2024-07-31T08:00:58.177Z","updated_at":"2025-04-06T18:17:08.399Z","avatar_url":"https://github.com/domluna.png","language":"Python","funding_links":[],"categories":["Models/Projects","Uncategorized","模型项目"],"sub_categories":["Uncategorized","微信群"],"readme":"# MemN2N\n\nImplementation of [End-To-End Memory Networks](http://arxiv.org/abs/1503.08895) with sklearn-like interface using Tensorflow. Tasks are from the [bAbl](http://arxiv.org/abs/1502.05698) dataset.\n\n![MemN2N picture](https://www.dropbox.com/s/3rdwfxt80v45uqm/Screenshot%202015-11-19%2000.57.27.png?dl=1)\n\n### Get Started\n\n```\ngit clone git@github.com:domluna/memn2n.git\n\nmkdir ./memn2n/data/\ncd ./memn2n/data/\nwget http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz\ntar xzvf ./tasks_1-20_v1-2.tar.gz\n\ncd ../\npython single.py\n```\n\n### Examples\n\nRunning a [single bAbI task](./single.py)\n\nRunning a [joint model on all bAbI tasks](./joint.py)\n\nThese files are also a good example of usage.\n\n### Requirements\n\n* tensorflow 1.0\n* scikit-learn 0.17.1\n* six 1.10.0\n\n### Single Task Results\n\nFor a task to pass it has to meet 95%+ testing accuracy. Measured on single tasks on the 1k data.\n\nPass: 1,4,12,15,20\n\nSeveral other tasks have 80%+ testing accuracy.\n\nStochastic gradient descent optimizer was used with an annealed learning rate schedule as specified in Section 4.2 of [End-To-End Memory Networks](http://arxiv.org/abs/1503.08895)\n\nThe following params were used:\n  * epochs: 100\n  * hops: 3\n  * embedding_size: 20\n\nTask  |  Training Accuracy  |  Validation Accuracy  |  Testing Accuracy\n------|---------------------|-----------------------|------------------\n1     |  1.0                |  1.0                  |  1.0\n2     |  1.0                |  0.86                 |  0.83\n3     |  1.0                |  0.64                 |  0.54\n4     |  1.0                |  0.99                 |  0.98\n5     |  1.0                |  0.94                 |  0.87\n6     |  1.0                |  0.97                 |  0.92\n7     |  1.0                |  0.89                 |  0.84\n8     |  1.0                |  0.93                 |  0.86\n9     |  1.0                |  0.86                 |  0.90\n10    |  1.0                |  0.80                 |  0.78\n11    |  1.0                |  0.92                 |  0.84\n12    |  1.0                |  1.0                  |  1.0\n13    |  0.99               |  0.94                 |  0.90\n14    |  1.0                |  0.97                 |  0.93\n15    |  1.0                |  1.0                  |  1.0\n16    |  0.81               |  0.47                 |  0.44\n17    |  0.76               |  0.65                 |  0.52\n18    |  0.97               |  0.96                 |  0.88\n19    |  0.40               |  0.17                 |  0.13\n20    |  1.0                |  1.0                  |  1.0\n\n\n### Joint Training Results\n\nPass: 1,6,9,10,12,13,15,20\n\nAgain stochastic gradient descent optimizer was used with an annealed learning rate schedule as specified in Section 4.2 of [End-To-End Memory Networks](http://arxiv.org/abs/1503.08895)\n\nThe following params were used:\n  * epochs: 60\n  * hops: 3\n  * embedding_size: 40\n\nTask  | Training Accuracy | Validation Accuracy |  Testing Accuracy\n------|-------------------|---------------------|------------------- \n1     | 1.0               | 0.99                | 0.999\n2     | 1.0               | 0.84                | 0.849\n3     | 0.99              | 0.72                | 0.715\n4     | 0.96              | 0.86                | 0.851\n5     | 1.0               | 0.92                | 0.865\n6     | 1.0               | 0.97                | 0.964\n7     | 0.96              | 0.87                | 0.851\n8     | 0.99              | 0.89                | 0.898\n9     | 0.99              | 0.96                | 0.96\n10    | 1.0               | 0.96                | 0.928\n11    | 1.0               | 0.98                | 0.93\n12    | 1.0               | 0.98                | 0.982\n13    | 0.99              | 0.98                | 0.976\n14    | 1.0               | 0.81                | 0.877\n15    | 1.0               | 1.0                 | 0.983\n16    | 0.64              | 0.45                | 0.44\n17    | 0.77              | 0.64                | 0.547\n18    | 0.85              | 0.71                | 0.586\n19    | 0.24              | 0.07                | 0.104\n20    | 1.0               | 1.0                 | 0.996\n\n\n\n### Notes\n\nSingle task results are from 10 repeated trails of the single task model accross all 20 tasks with different random initializations. The performance of the model with the lowest validation accuracy for each task is shown in the table above.\n\nJoint training results are from 10 repeated trails of the joint model accross all tasks. The performance of the single model whose validation accuracy passed the most tasks (\u003e= 0.95) is shown in the table above (joint_scores_run2.csv). The scores from all 10 runs are located in the results/ directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomluna%2Fmemn2n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomluna%2Fmemn2n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomluna%2Fmemn2n/lists"}