{"id":13718630,"url":"https://github.com/stared/keras-sequential-ascii","last_synced_at":"2025-06-26T02:05:20.376Z","repository":{"id":57438361,"uuid":"78762147","full_name":"stared/keras-sequential-ascii","owner":"stared","description":"ASCII summary for simple sequential models in Keras","archived":false,"fork":false,"pushed_at":"2019-01-28T15:19:03.000Z","size":16,"stargazers_count":127,"open_issues_count":1,"forks_count":18,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-20T02:54:03.416Z","etag":null,"topics":["ascii","convnet","deep-learning","keras","keras-visualization","sequential-models"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stared.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-12T16:02:50.000Z","updated_at":"2025-05-10T17:46:09.000Z","dependencies_parsed_at":"2022-08-29T08:40:36.220Z","dependency_job_id":null,"html_url":"https://github.com/stared/keras-sequential-ascii","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stared/keras-sequential-ascii","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Fkeras-sequential-ascii","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Fkeras-sequential-ascii/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Fkeras-sequential-ascii/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Fkeras-sequential-ascii/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stared","download_url":"https://codeload.github.com/stared/keras-sequential-ascii/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stared%2Fkeras-sequential-ascii/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261004032,"owners_count":23095708,"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":["ascii","convnet","deep-learning","keras","keras-visualization","sequential-models"],"created_at":"2024-08-03T01:00:34.813Z","updated_at":"2025-06-26T02:05:20.354Z","avatar_url":"https://github.com/stared.png","language":"Jupyter Notebook","funding_links":[],"categories":["Network Visualisation"],"sub_categories":[],"readme":"# Sequential model in Keras -\u003e ASCII\n\nby [Piotr Migdał](http://p.migdal.pl/)\n\nA library for [Keras](https://keras.io/) for investigating architectures and parameters of sequential models.\n\n**(discontinuted)** For more general approaches, see: [Simple diagrams of convoluted neural networks](https://medium.com/inbrowserai/simple-diagrams-of-convoluted-neural-networks-39c097d2925b)\n\nBoth `model.summary()` and graph export were not enough - I wanted array dimensions, numbers of parameters and activation functions in one place.\nI use it for didactic purpose.\n\n* TODO\n  * Add ASCII art for more layers.\n  * Go beyond simple sequential models (e.g. to allow *merge* layers); any ideas how?\n  * Consider PRing to the main Keras repo, see [#3873](https://github.com/fchollet/keras/issues/3873).\n\nSee this library in the wild, for example:\n\n* [Starting deep learning hands-on: image classification on CIFAR-10](https://blog.deepsense.ai/deep-learning-hands-on-image-classification/) - my post at deepsense.ai\n* [Cifar-10 Classification using Keras Tutorial](https://blog.plon.io/tutorials/cifar-10-classification-using-keras-tutorial/) at Plon.io\n\n\n\n## Installation\n\nFrom PyPI:\n\n```\npip install keras_sequential_ascii\n```\n\nOr from this repo:\n\n\n```\npip install git+git://github.com/stared/keras-sequential-ascii.git\n```\n\n## Usage\n\n```\nfrom keras_sequential_ascii import keras2ascii\nkeras2ascii(model)\n```\n\n## Examples\n\n### Proof of principle\n\n```\n           OPERATION           DATA DIMENSIONS   WEIGHTS(N)   WEIGHTS(%)\n\n               Input   #####      3   32   32\n  BatchNormalization    μ|σ  -------------------        64     0.1%\n                       #####      3   32   32\n       Convolution2D    \\|/  -------------------       448     0.8%\n                relu   #####     16   30   30\n       Convolution2D    \\|/  -------------------      2320     4.3%\n                relu   #####     16   28   28\n        MaxPooling2D   Y max -------------------         0     0.0%\n                       #####     16   14   14\n       Convolution2D    \\|/  -------------------       272     0.5%\n                tanh   #####     16   14   14\n             Flatten   ||||| -------------------         0     0.0%\n                       #####        3136\n               Dense   XXXXX -------------------     50192    94.1%\n                       #####          16\n             Dropout    | || -------------------         0     0.0%\n                       #####          16\n               Dense   XXXXX -------------------        51     0.1%\n             softmax   #####           3\n```\n\n### VGG16\n\n```\n           OPERATION           DATA DIMENSIONS   WEIGHTS(N)   WEIGHTS(%)\n\n              Input   #####      3  224  224\n         InputLayer     |   -------------------         0     0.0%\n                      #####      3  224  224\n      Convolution2D    \\|/  -------------------      1792     0.0%\n               relu   #####     64  224  224\n      Convolution2D    \\|/  -------------------     36928     0.0%\n               relu   #####     64  224  224\n       MaxPooling2D   Y max -------------------         0     0.0%\n                      #####     64  112  112\n      Convolution2D    \\|/  -------------------     73856     0.1%\n               relu   #####    128  112  112\n      Convolution2D    \\|/  -------------------    147584     0.1%\n               relu   #####    128  112  112\n       MaxPooling2D   Y max -------------------         0     0.0%\n                      #####    128   56   56\n      Convolution2D    \\|/  -------------------    295168     0.2%\n               relu   #####    256   56   56\n      Convolution2D    \\|/  -------------------    590080     0.4%\n               relu   #####    256   56   56\n      Convolution2D    \\|/  -------------------    590080     0.4%\n               relu   #####    256   56   56\n       MaxPooling2D   Y max -------------------         0     0.0%\n                      #####    256   28   28\n      Convolution2D    \\|/  -------------------   1180160     0.9%\n               relu   #####    512   28   28\n      Convolution2D    \\|/  -------------------   2359808     1.7%\n               relu   #####    512   28   28\n      Convolution2D    \\|/  -------------------   2359808     1.7%\n               relu   #####    512   28   28\n       MaxPooling2D   Y max -------------------         0     0.0%\n                      #####    512   14   14\n      Convolution2D    \\|/  -------------------   2359808     1.7%\n               relu   #####    512   14   14\n      Convolution2D    \\|/  -------------------   2359808     1.7%\n               relu   #####    512   14   14\n      Convolution2D    \\|/  -------------------   2359808     1.7%\n               relu   #####    512   14   14\n       MaxPooling2D   Y max -------------------         0     0.0%\n                      #####    512    7    7\n            Flatten   ||||| -------------------         0     0.0%\n                      #####       25088\n              Dense   XXXXX ------------------- 102764544    74.3%\n               relu   #####        4096\n              Dense   XXXXX -------------------  16781312    12.1%\n               relu   #####        4096\n              Dense   XXXXX -------------------   4097000     3.0%\n            softmax   #####        1000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstared%2Fkeras-sequential-ascii","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstared%2Fkeras-sequential-ascii","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstared%2Fkeras-sequential-ascii/lists"}