{"id":18395785,"url":"https://github.com/x-raylaser/generative-rnn","last_synced_at":"2025-08-04T18:16:07.270Z","repository":{"id":83253799,"uuid":"200270714","full_name":"X-rayLaser/generative-rnn","owner":"X-rayLaser","description":"This repository is made as supplementary material for a tutorial. The tutorial shows how to use Recurrent Neural Nets as generative models.","archived":false,"fork":false,"pushed_at":"2019-08-03T12:27:38.000Z","size":22511,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T02:24:57.549Z","etag":null,"topics":["bayes-rule","bayesian-inference","deep-learning","digit-generation","generative-model","mnist","pixel-prediction","recurrent-neural-nets","recurrent-neural-networks","tutorial"],"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/X-rayLaser.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":"2019-08-02T17:05:57.000Z","updated_at":"2022-01-09T11:22:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e424ed9-050d-4e1b-b271-63f257aedfb5","html_url":"https://github.com/X-rayLaser/generative-rnn","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/X-rayLaser%2Fgenerative-rnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-rayLaser%2Fgenerative-rnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-rayLaser%2Fgenerative-rnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-rayLaser%2Fgenerative-rnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/X-rayLaser","download_url":"https://codeload.github.com/X-rayLaser/generative-rnn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248580604,"owners_count":21128021,"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":["bayes-rule","bayesian-inference","deep-learning","digit-generation","generative-model","mnist","pixel-prediction","recurrent-neural-nets","recurrent-neural-networks","tutorial"],"created_at":"2024-11-06T02:11:55.621Z","updated_at":"2025-04-12T14:29:32.039Z","avatar_url":"https://github.com/X-rayLaser.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\nThis repository is made as supplementary material for a tutorial. \nThe tutorial shows how to use Recurrent Neural Nets as generative \nmodels. Specifically, it shows how such a model can be used to \nsample images and classify them. For more information, see the \nfile \"tutorial.md\" in the repository.\n\nThis repository contains pre-trained generative models. The \n\"trained/minst_models\" folder contains all 10 models for each of \nMNIST digits. Each pre-trained model was trained on MNIST training \ndata for 12 epochs using \"Adam\" optimizer with a standard set of \nhyperparameters and a batch size of 32 examples. Cross-entropy was \nused as a loss function.\n\nHere are a few examples of generated digits:\n\n![alt text](generated/better_samples_of_0.jpg \"Samples of a digit 0\")\n![alt text](generated/better_samples_of_2.jpg \"Samples of a digit 2\")\n![alt text](generated/better_samples_of_8.jpg \"Samples of a digit 8\")\n\n# Installing and preparing the environment\nClone the repository,\n```\ngit clone https://github.com/X-rayLaser/generative-rnn.git\n```\nswitch to the project's directory,\n```\ncd generative-rnn\n```\n\ncreate a virtual environment for Python and activate it,\n```\nwhich python3\n/usr/bin/python3\n```\n```\nvirtualenv --python='/usr/bin/python3' venv\n. venv/bin/activate\n```\n\nfinally, install dependencies with pip\n```\npip install -r requirements.txt\n```\n\n# Usage\nGenerate images of a digit \"8\"\n```\npython generate_mnist.py --digit=8\n```\n\nEstimate classification accuracy on 500 MNIST test examples\n```\npython classification.py --num_images=500\n```\n\nTrain a model on a digit \"8\" using 200 MNIST images for 100 epochs\n```\npython train_mnist.py --digit=8 --num_images=200 --epochs=100\n```\n\nTrain all 10 models, one for each digit for 10 epochs on 1000 images\n```\npython train_mnist.py --all_digits=True --num_images=1000 --epochs=10\n```\n\n# License\nThis software is licensed under MIT license (see LICENSE).\n\n## Third party libraries licenses\nThe software uses third party libraries that are distributed under \ntheir own terms (see LICENSE-3RD-PARTY).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-raylaser%2Fgenerative-rnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-raylaser%2Fgenerative-rnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-raylaser%2Fgenerative-rnn/lists"}