{"id":17086572,"url":"https://github.com/jessefarebro/pixelcnnpp","last_synced_at":"2025-04-12T21:41:23.290Z","repository":{"id":37615458,"uuid":"228072395","full_name":"JesseFarebro/PixelCNNPP","owner":"JesseFarebro","description":"Tensorflow 2 implementation of PixelCNN++.","archived":false,"fork":false,"pushed_at":"2023-03-24T22:34:56.000Z","size":24,"stargazers_count":9,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T15:48:15.736Z","etag":null,"topics":["autoregressive-neural-networks","generative-model","pixelcnn","tensorflow","tensorflow2"],"latest_commit_sha":null,"homepage":null,"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/JesseFarebro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-14T18:48:30.000Z","updated_at":"2023-11-11T23:52:36.000Z","dependencies_parsed_at":"2023-01-21T11:46:06.428Z","dependency_job_id":null,"html_url":"https://github.com/JesseFarebro/PixelCNNPP","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/JesseFarebro%2FPixelCNNPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JesseFarebro%2FPixelCNNPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JesseFarebro%2FPixelCNNPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JesseFarebro%2FPixelCNNPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JesseFarebro","download_url":"https://codeload.github.com/JesseFarebro/PixelCNNPP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637832,"owners_count":21137538,"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":["autoregressive-neural-networks","generative-model","pixelcnn","tensorflow","tensorflow2"],"created_at":"2024-10-14T13:28:58.265Z","updated_at":"2025-04-12T21:41:23.269Z","avatar_url":"https://github.com/JesseFarebro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PixelCNN++\n\nTensorFlow 2 distributed implementation of PixelCNN++ [[1]](https://arxiv.org/abs/1701.05517).\n\n## Setup\n\nTo install the required dependencies you can simply run:\n```\npip install requirements.txt\n```\n\nYou will need a machine that preferablly has multiple GPU's. Training PixelCNN++ on modest datasets like Cifar10 can take days or weeks with multiple GPU's to obtains results comparable to the original paper.\n\n## Training\n\nTo train on a single GPU or CPU:\n```\npython main.py --config experiments/mnist.gin single\n```\n\nTo train with multiple GPUs:\n```\npython main.py --config experiments/mnist.gin multigpu\n```\n\nYou can change Gin parameters on the command line by using the `--binding` flag. You can use this flag multiple times. For example,\n```\npython main.py --config experiments/mnist.gin --binding \"train.batch_size=128\" multigpu\n```\n\n## Custom Datasets\n\nYou can easily use a custom dataset with this implementation.\nYou just need to define a function that returns a tuple `(train, test)` which returns a train and test Tensorflow `tf.data.Dataset` object. You can then bind `train.dataset_fn` to your new dataset function using Gin.\n\nNote you can use a dataset with any number of channels without any further modification. If you use one channel make sure that the image shape is still `(W, H, 1)`.\n\n## Omissions\n\n* Currently, evaluation doesn't employ Polyak averaging over previous weights. This is planned with the Tensorflow Addons `tfa.optimizers.MovingAverage`.\n\n* I don't currently use the \"autoregressive channel\" discussed in the original paper.\n\n* WeightNormalization doesn't use data dependent initialization. This is planned in the future with Tensorflow Addons.\n\n\n## References\n\n[1] [PixelCNN++: Improving the PixelCNN with Discretized Logistic Mixture Likelihood and Other Modifications](https://arxiv.org/abs/1701.05517)\n\n\n[2] [Conditional Image Generation with PixelCNN Decoders](https://arxiv.org/abs/1606.05328)\n\n\n[3] [OpenAI PixelCNN++ Implementation](https://github.com/openai/pixel-cnn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessefarebro%2Fpixelcnnpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessefarebro%2Fpixelcnnpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessefarebro%2Fpixelcnnpp/lists"}