{"id":15468994,"url":"https://github.com/ajaysub110/tensor_genn","last_synced_at":"2025-04-04T10:37:32.381Z","repository":{"id":113986171,"uuid":"190334051","full_name":"ajaysub110/tensor_genn","owner":"ajaysub110","description":"A library for converting models trained using TensorFlow into GeNN","archived":false,"fork":false,"pushed_at":"2019-11-16T16:43:46.000Z","size":34945,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T20:44:12.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajaysub110.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":"2019-06-05T05:53:59.000Z","updated_at":"2020-05-01T15:23:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"4aa31e3c-7efb-4ffe-bead-013d94c4a57e","html_url":"https://github.com/ajaysub110/tensor_genn","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":"0.11764705882352944","last_synced_commit":"01eb9deb2dc9a9545721e6539ca9483057d77cb3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaysub110%2Ftensor_genn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaysub110%2Ftensor_genn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaysub110%2Ftensor_genn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaysub110%2Ftensor_genn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajaysub110","download_url":"https://codeload.github.com/ajaysub110/tensor_genn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247164352,"owners_count":20894634,"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":[],"created_at":"2024-10-02T01:48:39.311Z","updated_at":"2025-04-04T10:37:32.364Z","avatar_url":"https://github.com/ajaysub110.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TensorGeNN\n\nA Python library for converting trained TensorFlow ANNs to GeNN spiking neural networks with low loss in performance using the algorithm proposed by *Diehl et al.* in \"***Fast-Classifying, High-Accuracy Spiking Deep Networks Through Weight and Threshold Balancing***\"\n\n## Results\nBelow are the results of conversion experiments on MNIST and CIFAR-10 with and without data-based normalization.\n\n### 1) MNIST\n**ANN model**:\\\nTrained on 60000 examples for 5 epochs.\\\nTrain accuracy: 99.21% on 60000 examples\\\nTest accuracy: 98.86% on 10000 examples\n\n**GeNN model**:\\\nConversion parameters:\\\nsingle_example_time = 350\\\ndense_membrane_capacitance = 1.0\\\nsparse_membrane_capacitance = 0.2\\\nneuron_threshold_voltage = -57.0\\\nneuron_resting_voltage = -60.0\n\n**On three trials**: (all accuracies on test set)\\\nNote: ANN test set contains 10000 example while the GeNN accuracies have been computed on 500 examples.\n\n| ANN accuracy  | GeNN (without normalization) | GeNN (with normalization) |\n| ------------- | ---------------------------- | ------------------------- |\n| 98.91%        | 97.8%                        | 98.0%                     |\n| 98.88%        | 96.8%                        | 97.2%                     |\n| 98.88%        | 96.8%                        | 96.6%                     |\n\n### 2) CIFAR-10\n**ANN model**:\\\nTrained on 50000 examples for 10 epochs.\\\nTrain accuracy: 90.99% on 50000 examples\\\nTest accuracy: 77.29% on 10000 examples (overfitting since I haven't added dropout layers yet)\n\n**GeNN model**:\\\nConversion parameters:\\\nsingle_example_time = 3750 (though it takes only ~2500 with no weight normalization)\\\ndense_membrane_capacitance = 0.1\\\nsparse_membrane_capacitance = 0.01\\\nneuron_threshold_voltage = -58.0\\\nneuron_resting_voltage = -60.0\n\n**On one trials**: (all accuracies on test set)\\\nNote: ANN test set contains 10000 example while the GeNN accuracies have been computed on 500 examples.\n\n| ANN accuracy  | GeNN (without normalization) | GeNN (with normalization) |\n| ------------- | ---------------------------- | ------------------------- |\n| 77.29%        | 75.0%                        | 77.0%                     |\n\n## Requirements:\n- Python 3\n- TensorFlow\n- PyGeNN (see [here](https://github.com/genn-team/genn/blob/master/pygenn/README.md) for installation instructions)\n- Matplotlib\n\n## Installation:\nNote: Since work is still in progress, we don't have a standard installation procedure. However, in the meantime, you can follow the steps below.\n1. Clone the repository: `git clone https://github.com/genn-team/tensor_genn.git`\n2. Change directory: `cd ~/tensor_genn`\n3. Create a new file and follow a procedure shown in `conversion_example.py` to convert your TensorFlow model into GeNN.\n\n## References:\n- Peter U. Diehl, Daniel Neil, Jonathan Binas, Matthew Cook, Shih-Chii Liu, and Michael Pfeiffer. 2015. Fast-Classifying, High-Accuracy Spiking Deep Networks Through Weight and Threshold Balancing. IJCNN (2015)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaysub110%2Ftensor_genn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajaysub110%2Ftensor_genn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaysub110%2Ftensor_genn/lists"}