{"id":13763201,"url":"https://github.com/sugyan/tf-dcgan","last_synced_at":"2025-04-22T15:12:43.519Z","repository":{"id":45084021,"uuid":"59660994","full_name":"sugyan/tf-dcgan","owner":"sugyan","description":"DCGAN implementation by TensorFlow","archived":false,"fork":false,"pushed_at":"2017-03-20T02:10:28.000Z","size":20,"stargazers_count":157,"open_issues_count":1,"forks_count":50,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-22T15:12:34.114Z","etag":null,"topics":["dcgan","tensorflow"],"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/sugyan.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}},"created_at":"2016-05-25T12:22:42.000Z","updated_at":"2024-12-10T00:21:39.000Z","dependencies_parsed_at":"2022-07-13T05:10:32.004Z","dependency_job_id":null,"html_url":"https://github.com/sugyan/tf-dcgan","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/sugyan%2Ftf-dcgan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugyan%2Ftf-dcgan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugyan%2Ftf-dcgan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugyan%2Ftf-dcgan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sugyan","download_url":"https://codeload.github.com/sugyan/tf-dcgan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250264911,"owners_count":21402004,"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":["dcgan","tensorflow"],"created_at":"2024-08-03T15:00:37.852Z","updated_at":"2025-04-22T15:12:43.500Z","avatar_url":"https://github.com/sugyan.png","language":"Python","funding_links":[],"categories":["2017/03/06"],"sub_categories":[],"readme":"# TensorFlow implementation of DCGAN\n\n\n### What is DCGAN ? ###\n\nDeep Convolutional Generative Adversarial Networks\n\n- http://arxiv.org/abs/1511.06434\n\n\n#### Other implementations of DCGAN ####\n\n- https://github.com/Newmu/dcgan_code (Theano)\n- https://github.com/soumith/dcgan.torch (Torch)\n- https://github.com/mattya/chainer-DCGAN (Chainer)\n- https://github.com/carpedm20/DCGAN-tensorflow (TensorFlow)\n\n\n### Prerequisites ###\n\n- Python \u003e= 2.7 or 3.5\n - TensorFlow \u003e= 1.0\n\n\n### Usage ###\n\n#### Train ####\n\n```python\ndcgan = DCGAN()\ntrain_images = \u003cimages batch\u003e\nlosses = dcgan.loss(train_images)\ntrain_op = dcgan.train(losses)\n\nwith tf.Session() as sess:\n    sess.run(tf.global_variables_initializer())\n\n    for step in range(FLAGS.max_steps):\n        _, g_loss_value, d_loss_value = sess.run([train_op, losses[dcgan.g], losses[dcgan.d]])\n    # save trained variables\n```\n\n#### Generate ####\n\n```python\ndcgan = DCGAN()\nimages = dcgan.sample_images()\n\nwith tf.Session() as sess:\n    # restore trained variables\n\n    generated = sess.run(images)\n    with open('\u003cfilename\u003e', 'wb') as f:\n        f.write(generated)\n```\n\n\n### Example ###\n\n- https://github.com/sugyan/face-generator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugyan%2Ftf-dcgan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsugyan%2Ftf-dcgan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugyan%2Ftf-dcgan/lists"}