{"id":16541151,"url":"https://github.com/anibali/weightnorm","last_synced_at":"2025-09-13T05:31:50.089Z","repository":{"id":137206758,"uuid":"84128076","full_name":"anibali/weightnorm","owner":"anibali","description":"Unofficial Torch implementation of weight normalization","archived":false,"fork":false,"pushed_at":"2017-03-07T01:28:59.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T08:52:06.226Z","etag":null,"topics":["lua","neural-network","torch7"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/anibali.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":"2017-03-06T22:35:39.000Z","updated_at":"2017-03-06T22:37:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"495d2cda-1c32-4a23-af74-72a4a55f5038","html_url":"https://github.com/anibali/weightnorm","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/anibali%2Fweightnorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibali%2Fweightnorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibali%2Fweightnorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anibali%2Fweightnorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anibali","download_url":"https://codeload.github.com/anibali/weightnorm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787488,"owners_count":20020099,"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":["lua","neural-network","torch7"],"created_at":"2024-10-11T18:54:13.015Z","updated_at":"2025-03-04T04:40:57.907Z","avatar_url":"https://github.com/anibali.png","language":"Lua","readme":"# Weight normalization\n\nThis is an unofficial Torch implementation of [\"Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks\"](http://arxiv.org/abs/1602.07868)\nby T. Salimans and D. P. Kingma.\n\nShould work with any weighted layer, including `cudnn` versions.\n\n## Usage\n\n```lua\nlocal wn = require('weightnorm')\n\n-- Construct the neural network as usual, but use `wn()` to wrap weighted\n-- layers that you want to be weight normalized.\nlocal net = nn.Sequential()\nnet:add(wn(nn.Linear(32*32, 200)))\nnet:add(nn.ReLU())\nnet:add(wn(nn.Linear(200, 200)))\nnet:add(nn.ReLU())\nnet:add(wn(nn.Linear(200, 10)))\n\n-- [Optional] Perform a data-driven initialization pass.\n-- Only works in batch mode.\nlocal batch_input = my_batch_input_loader_function()\nnet:set_init_pass(true)\nnet:forward(batch_input)\nnet:set_init_pass(false)\n```\n\n## Examples\n\nThe examples require [torchnet](https://github.com/torchnet/torchnet) to be\ninstalled.\n\n### MNIST MLP\n\n1. Download MNIST: `bash examples/mnist/download_mnist.sh`\n2. Train the network: `th examples/mnist/train_mlp_mnist.lua`\n\n## Tests\n\nRun the tests with the following command:\n\n`th test/run_tests.lua`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanibali%2Fweightnorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanibali%2Fweightnorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanibali%2Fweightnorm/lists"}