{"id":17606410,"url":"https://github.com/atcold/torch-pretty-nn","last_synced_at":"2025-04-30T12:20:41.728Z","repository":{"id":73551415,"uuid":"68857911","full_name":"Atcold/torch-pretty-nn","owner":"Atcold","description":"Brings some colour to the boring `nn` package of Torch.","archived":false,"fork":false,"pushed_at":"2016-09-21T23:33:56.000Z","size":111,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T16:05:51.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/Atcold.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-21T21:12:06.000Z","updated_at":"2025-03-02T15:41:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"63eae15b-9932-4d99-95e2-1d007fd245a5","html_url":"https://github.com/Atcold/torch-pretty-nn","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/Atcold%2Ftorch-pretty-nn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atcold%2Ftorch-pretty-nn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atcold%2Ftorch-pretty-nn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atcold%2Ftorch-pretty-nn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atcold","download_url":"https://codeload.github.com/Atcold/torch-pretty-nn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251700499,"owners_count":21629837,"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-22T15:44:25.461Z","updated_at":"2025-04-30T12:20:41.686Z","avatar_url":"https://github.com/Atcold.png","language":"Lua","readme":"# Pretty-nn\n\n`pretty-nn` package brings some colour to the boring `nn` package of Torch.\n\n## Installation\n\n```\nluarocks install pretty-nn\n```\n\n## Usage\n\nSay we have the following model\n\n```lua\nc = nn.Parallel(1,2)\nfor i = 1, 3 do\n   local t = nn.Sequential()\n   t:add(nn.Linear(4, 2))\n   t:add(nn.Reshape(2, 1))\n   c:add(t)\nend\nsplit = nn.Concat(2)\nsplit:add(c)\nblock = nn.Sequential()\nblock:add(nn.View(-1))\nblock:add(nn.Linear(12, 4))\nblock:add(nn.View(2, 2))\nsplit:add(block)\n```\n\nIf we print it on screen with `print(split)` we get something like this\n\n![Boring](img/boring.png)\n\nIf we `require 'pretty-nn'` and `print(split)` again, we'll get this\n\n![Cool](img/cool1.png)\n\nYou can toggle the prettiness with `yourModelName:prettyPrint()`.\nAlternative, you can *enable / disable* it by `yourModelName:prettyPrint(true / false)`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatcold%2Ftorch-pretty-nn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatcold%2Ftorch-pretty-nn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatcold%2Ftorch-pretty-nn/lists"}