{"id":13512456,"url":"https://github.com/HarisIqbal88/PlotNeuralNet","last_synced_at":"2025-03-30T22:32:52.578Z","repository":{"id":37653935,"uuid":"142187665","full_name":"HarisIqbal88/PlotNeuralNet","owner":"HarisIqbal88","description":"Latex code for making neural networks diagrams","archived":false,"fork":false,"pushed_at":"2023-08-21T17:47:04.000Z","size":2269,"stargazers_count":22060,"open_issues_count":86,"forks_count":2872,"subscribers_count":226,"default_branch":"master","last_synced_at":"2024-10-29T10:11:39.667Z","etag":null,"topics":["deep-neural-networks","latex"],"latest_commit_sha":null,"homepage":null,"language":"TeX","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/HarisIqbal88.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}},"created_at":"2018-07-24T16:51:34.000Z","updated_at":"2024-10-29T06:11:22.000Z","dependencies_parsed_at":"2023-02-02T08:00:37.902Z","dependency_job_id":"bfb4827d-1a62-47f7-86f8-b0a3693ad5e2","html_url":"https://github.com/HarisIqbal88/PlotNeuralNet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarisIqbal88%2FPlotNeuralNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarisIqbal88%2FPlotNeuralNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarisIqbal88%2FPlotNeuralNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarisIqbal88%2FPlotNeuralNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HarisIqbal88","download_url":"https://codeload.github.com/HarisIqbal88/PlotNeuralNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390877,"owners_count":20769476,"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":["deep-neural-networks","latex"],"created_at":"2024-08-01T03:01:52.605Z","updated_at":"2025-03-30T22:32:47.562Z","avatar_url":"https://github.com/HarisIqbal88.png","language":"TeX","readme":"# PlotNeuralNet\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2526396.svg)](https://doi.org/10.5281/zenodo.2526396)\n\nLatex code for drawing neural networks for reports and presentation. Have a look into examples to see how they are made. Additionally, lets consolidate any improvements that you make and fix any bugs to help more people with this code.\n\n## Examples\n\nFollowing are some network representations:\n\n\u003cp align=\"center\"\u003e\u003cimg  src=\"https://user-images.githubusercontent.com/17570785/50308846-c2231880-049c-11e9-8763-3daa1024de78.png\" width=\"85%\" height=\"85%\"\u003e\u003c/p\u003e\n\u003ch6 align=\"center\"\u003eFCN-8 (\u003ca href=\"https://www.overleaf.com/read/kkqntfxnvbsk\"\u003eview on Overleaf\u003c/a\u003e)\u003c/h6\u003e\n\n\n\u003cp align=\"center\"\u003e\u003cimg  src=\"https://user-images.githubusercontent.com/17570785/50308873-e2eb6e00-049c-11e9-9587-9da6bdec011b.png\" width=\"85%\" height=\"85%\"\u003e\u003c/p\u003e\n\u003ch6 align=\"center\"\u003eFCN-32 (\u003ca href=\"https://www.overleaf.com/read/wsxpmkqvjnbs\"\u003eview on Overleaf\u003c/a\u003e)\u003c/h6\u003e\n\n\n\u003cp align=\"center\"\u003e\u003cimg  src=\"https://user-images.githubusercontent.com/17570785/50308911-03b3c380-049d-11e9-92d9-ce15669017ad.png\" width=\"85%\" height=\"85%\"\u003e\u003c/p\u003e\n\u003ch6 align=\"center\"\u003eHolistically-Nested Edge Detection (\u003ca href=\"https://www.overleaf.com/read/jxhnkcnwhfxp\"\u003eview on Overleaf\u003c/a\u003e)\u003c/h6\u003e\n\n## Getting Started\n1. Install the following packages on Ubuntu.\n    * Ubuntu 16.04\n        ```\n        sudo apt-get install texlive-latex-extra\n        ```\n\n    * Ubuntu 18.04.2\nBase on this [website](https://gist.github.com/rain1024/98dd5e2c6c8c28f9ea9d), please install the following packages.\n        ```\n        sudo apt-get install texlive-latex-base\n        sudo apt-get install texlive-fonts-recommended\n        sudo apt-get install texlive-fonts-extra\n        sudo apt-get install texlive-latex-extra\n        ```\n\n    * Windows\n    1. Download and install [MikTeX](https://miktex.org/download).\n    2. Download and install bash runner on Windows, recommends [Git bash](https://git-scm.com/download/win) or Cygwin(https://www.cygwin.com/)\n\n2. Execute the example as followed.\n    ```\n    cd pyexamples/\n    bash ../tikzmake.sh test_simple\n    ```\n\n## TODO\n\n- [X] Python interface\n- [ ] Add easy legend functionality\n- [ ] Add more layer shapes like TruncatedPyramid, 2DSheet etc\n- [ ] Add examples for RNN and likes.\n\n## Latex usage\n\nSee [`examples`](examples) directory for usage.\n\n## Python usage\n\nFirst, create a new directory and a new Python file:\n\n    $ mkdir my_project\n    $ cd my_project\n    vim my_arch.py\n\nAdd the following code to your new file:\n\n```python\nimport sys\nsys.path.append('../')\nfrom pycore.tikzeng import *\n\n# defined your arch\narch = [\n    to_head( '..' ),\n    to_cor(),\n    to_begin(),\n    to_Conv(\"conv1\", 512, 64, offset=\"(0,0,0)\", to=\"(0,0,0)\", height=64, depth=64, width=2 ),\n    to_Pool(\"pool1\", offset=\"(0,0,0)\", to=\"(conv1-east)\"),\n    to_Conv(\"conv2\", 128, 64, offset=\"(1,0,0)\", to=\"(pool1-east)\", height=32, depth=32, width=2 ),\n    to_connection( \"pool1\", \"conv2\"),\n    to_Pool(\"pool2\", offset=\"(0,0,0)\", to=\"(conv2-east)\", height=28, depth=28, width=1),\n    to_SoftMax(\"soft1\", 10 ,\"(3,0,0)\", \"(pool1-east)\", caption=\"SOFT\"  ),\n    to_connection(\"pool2\", \"soft1\"),\n    to_end()\n    ]\n\ndef main():\n    namefile = str(sys.argv[0]).split('.')[0]\n    to_generate(arch, namefile + '.tex' )\n\nif __name__ == '__main__':\n    main()\n```\n\nNow, run the program as follows:\n\n    bash ../tikzmake.sh my_arch\n\n\n\n","funding_links":[],"categories":["TeX","Documentation and Presentation","Data Visualization","Illustrating Neural Nets","其他_机器学习与深度学习","Uncategorized"],"sub_categories":["Data Management","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHarisIqbal88%2FPlotNeuralNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHarisIqbal88%2FPlotNeuralNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHarisIqbal88%2FPlotNeuralNet/lists"}