{"id":15290464,"url":"https://github.com/renatosc/nnv","last_synced_at":"2025-04-13T10:11:41.511Z","repository":{"id":57446469,"uuid":"187758698","full_name":"renatosc/nnv","owner":"renatosc","description":"NNV - Neural Network Visualizer","archived":false,"fork":false,"pushed_at":"2021-07-05T23:02:11.000Z","size":2023,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:35:43.643Z","etag":null,"topics":["jupyter-notebook","keras","neural-network-visualizations","pip","python","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/renatosc.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}},"created_at":"2019-05-21T03:59:10.000Z","updated_at":"2025-01-30T08:17:53.000Z","dependencies_parsed_at":"2022-09-02T22:11:29.718Z","dependency_job_id":null,"html_url":"https://github.com/renatosc/nnv","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/renatosc%2Fnnv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatosc%2Fnnv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatosc%2Fnnv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatosc%2Fnnv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renatosc","download_url":"https://codeload.github.com/renatosc/nnv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695481,"owners_count":21146956,"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":["jupyter-notebook","keras","neural-network-visualizations","pip","python","tensorflow"],"created_at":"2024-09-30T16:08:16.858Z","updated_at":"2025-04-13T10:11:41.489Z","avatar_url":"https://github.com/renatosc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Network Visualizer (NNV)\n\nSimple and easy to use tool to generate Neural Network Visualizations.\n\n\n# Installation\n```\npip install nnv\n```\n\n# Usage\n\n```python\nfrom nnv import NNV\n\nlayersList = [\n    {\"title\":\"input\\n(relu)\", \"units\": 3, \"color\": \"darkBlue\"},\n    {\"title\":\"hidden 1\\n(relu)\", \"units\": 3},\n    {\"title\":\"hidden 2\\n(relu)\", \"units\": 3, \"edges_color\":\"red\", \"edges_width\":2},\n    {\"title\":\"output\\n(sigmoid)\", \"units\": 1,\"color\": \"darkBlue\"},\n]\n\nNNV(layersList).render()\n```\n\n![alt text](./examples/my_example_1.png \"Example\")\n\n\n\nIt is possible to customize the node size/colors, title font size, spacing between nodes and layers and maximum number of nodes to show,...\n\n\n```python\nfrom nnv import NNV\n\n# Let's increase the size of the plot\nimport matplotlib.pyplot as plt\nplt.rcParams[\"figure.figsize\"] = (200,10)\n\n\nlayers_list = [\n    {\"title\":\"input\\n(relu)\", \"units\": 300, \"color\": \"darkBlue\"},\n    {\"title\":\"hidden 1\\n(relu)\", \"units\": 150},\n    {\"title\":\"hidden 2\\n(relu)\",  \"units\": 75},\n    {\"title\":\"Dropout\\n(0.5)\", \"units\": 75, \"color\":\"lightGray\"},\n    {\"title\":\"hidden 4\\n(relu)\",  \"units\": 18},\n    {\"title\":\"hidden 5\\n(relu)\",  \"units\": 9},\n    {\"title\":\"hidden 6\\n(relu)\",  \"units\": 4},\n    {\"title\":\"output\\n(sigmoid)\", \"units\": 1, \"color\": \"darkBlue\"},\n]\n\n\nNNV(layers_list, max_num_nodes_visible=8, node_radius=10, spacing_layer=60, font_size=24).render(save_to_file=\"my_example_2.pdf\")\n```\n![alt text](./examples/my_example_2.jpg \"Example 2\")\n\n\n# Documentation\n\nNNV documentation is still being created. For now, if you have any question, please look directly the library source code or open an Issue.\n\n# Future addittions\n\nSome useful features that may be added in the future (help is welcome):\n- add labels to each node\n- import layers info directly from a keras model\n\n# Citation\nIf you use this library and would like to cite it, you can use:\n```\n R. Cordeiro, \"NNV: Neural Network Visualizer\", 2019. [Online]. Available: https://github.com/renatosc/nnv. [Accessed: DD- Month- 20YY].\n```\n\nor:\n\n```\n@Misc{,\n  author = {Renato Cordeiro},\n  title  = {NNV: Neural Network Visualizer},\n  month  = may,\n  year   = {2019},\n  note   = {Online; accessed \u003ctoday\u003e},\n  url    = {https://github.com/renatosc/nnv},\n}\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatosc%2Fnnv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenatosc%2Fnnv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatosc%2Fnnv/lists"}