{"action":"closed","number":18,"pull_request":{"url":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/18","id":238626717,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4NjI2NzE3","html_url":"https://github.com/sergeytulyakov/mocogan/pull/18","diff_url":"https://github.com/sergeytulyakov/mocogan/pull/18.diff","patch_url":"https://github.com/sergeytulyakov/mocogan/pull/18.patch","issue_url":"https://api.github.com/repos/sergeytulyakov/mocogan/issues/18","number":18,"state":"closed","locked":false,"title":"dim_z_category and video sampling fixes ","user":{"login":"VladYushchenko","id":13710810,"node_id":"MDQ6VXNlcjEzNzEwODEw","avatar_url":"https://avatars2.githubusercontent.com/u/13710810?v=4","gravatar_id":"","url":"https://api.github.com/users/VladYushchenko","html_url":"https://github.com/VladYushchenko","followers_url":"https://api.github.com/users/VladYushchenko/followers","following_url":"https://api.github.com/users/VladYushchenko/following{/other_user}","gists_url":"https://api.github.com/users/VladYushchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladYushchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladYushchenko/subscriptions","organizations_url":"https://api.github.com/users/VladYushchenko/orgs","repos_url":"https://api.github.com/users/VladYushchenko/repos","events_url":"https://api.github.com/users/VladYushchenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladYushchenko/received_events","type":"User","site_admin":false},"body":"Hi,\r\nI have found some small issues and would like to provide fixes on:\r\n\r\n**1) src/data.py - VideoDataset**\r\nSampling 16-frame sequence, taking every 2nd frame from shapes dataset cannot be done due to bug in data.py:102. With video_len = 32, self.video_length=16, self.every_nth=2 there are enough frames to sample video with stride 2. \r\nIn current version, frames from 0 to 15 are sampled, resulting into learning half of the full shape motion (from border to center).\r\n\r\n**2) src/models.py - VideoGenerator - sample_z_video**\r\nAs suggested in #16, launching training with dim_z_category=0 results into crash. \r\n\r\n**Output:**\r\n```\r\n{'--batches': '100000',\r\n  \"please use transforms.Resize instead.\")\r\n '--dim_z_category': '0',\r\n '--dim_z_content': '50',\r\n '--dim_z_motion': '10',\r\n '--every_nth': '2',\r\n '--image_batch': '32',\r\n '--image_dataset': '',\r\n '--image_discriminator': 'PatchImageDiscriminator',\r\n '--image_size': '64',\r\n '--n_channels': '3',\r\n '--noise_sigma': '0.1',\r\n '--print_every': '100',\r\n '--use_categories': False,\r\n '--use_infogan': False,\r\n '--use_noise': True,\r\n '--video_batch': '32',\r\n '--video_discriminator': 'PatchVideoDiscriminator',\r\n '--video_length': '16',\r\n '<dataset>': '../data/shapes',\r\n '<log_folder>': '../logs/shapes'}\r\nTotal number of frames 256000\r\nTraceback (most recent call last):\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/train.py\", line 130, in <module>\r\n    trainer.train(generator, image_discriminator, video_discriminator)\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/trainers.py\", line 262, in train\r\n    self.image_batch_size, use_categories=False)\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/trainers.py\", line 165, in train_discriminator\r\n    fake_batch, generated_categories = sample_fake(batch_size)\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/trainers.py\", line 236, in sample_fake_image_batch\r\n    return generator.sample_images(batch_size)\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/models.py\", line 282, in sample_images\r\n    z, z_category_labels = self.sample_z_video(num_samples * self.video_length * 2)\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/models.py\", line 258, in sample_z_video\r\n    z_category, z_category_labels = self.sample_z_categ(num_samples, video_len)\r\n  File \"/home/vlad/PycharmProjects/temp/mocogan/src/models.py\", line 234, in sample_z_categ\r\n    classes_to_generate = np.random.randint(self.dim_z_category, size=num_samples)\r\n  File \"mtrand.pyx\", line 993, in mtrand.RandomState.randint\r\nValueError: low >= high\r\n\r\nProcess finished with exit code 1 \r\n```\r\n\r\n**Fix**: not using z_category in sampling in src/models.py:261\r\n\r\nHope it was helpful\r\nRegards,\r\nVlad","created_at":"2018-12-14T06:53:37Z","updated_at":"2018-12-14T12:10:12Z","closed_at":"2018-12-14T12:10:11Z","merged_at":"2018-12-14T12:10:11Z","merge_commit_sha":"e531ffa1c947e074a7cb544726559e7d83c7254c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/18/commits","review_comments_url":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/18/comments","review_comment_url":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sergeytulyakov/mocogan/issues/18/comments","statuses_url":"https://api.github.com/repos/sergeytulyakov/mocogan/statuses/c603571b626915eee42afa707440dc3cfba3d0db","head":{"label":"VladYushchenko:master","ref":"master","sha":"c603571b626915eee42afa707440dc3cfba3d0db","user":{"login":"VladYushchenko","id":13710810,"node_id":"MDQ6VXNlcjEzNzEwODEw","avatar_url":"https://avatars2.githubusercontent.com/u/13710810?v=4","gravatar_id":"","url":"https://api.github.com/users/VladYushchenko","html_url":"https://github.com/VladYushchenko","followers_url":"https://api.github.com/users/VladYushchenko/followers","following_url":"https://api.github.com/users/VladYushchenko/following{/other_user}","gists_url":"https://api.github.com/users/VladYushchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladYushchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladYushchenko/subscriptions","organizations_url":"https://api.github.com/users/VladYushchenko/orgs","repos_url":"https://api.github.com/users/VladYushchenko/repos","events_url":"https://api.github.com/users/VladYushchenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladYushchenko/received_events","type":"User","site_admin":false},"repo":{"id":161699123,"node_id":"MDEwOlJlcG9zaXRvcnkxNjE2OTkxMjM=","name":"mocogan","full_name":"VladYushchenko/mocogan","private":false,"owner":{"login":"VladYushchenko","id":13710810,"node_id":"MDQ6VXNlcjEzNzEwODEw","avatar_url":"https://avatars2.githubusercontent.com/u/13710810?v=4","gravatar_id":"","url":"https://api.github.com/users/VladYushchenko","html_url":"https://github.com/VladYushchenko","followers_url":"https://api.github.com/users/VladYushchenko/followers","following_url":"https://api.github.com/users/VladYushchenko/following{/other_user}","gists_url":"https://api.github.com/users/VladYushchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladYushchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladYushchenko/subscriptions","organizations_url":"https://api.github.com/users/VladYushchenko/orgs","repos_url":"https://api.github.com/users/VladYushchenko/repos","events_url":"https://api.github.com/users/VladYushchenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladYushchenko/received_events","type":"User","site_admin":false},"html_url":"https://github.com/VladYushchenko/mocogan","description":"MoCoGAN: Decomposing Motion and Content for Video Generation","fork":true,"url":"https://api.github.com/repos/VladYushchenko/mocogan","forks_url":"https://api.github.com/repos/VladYushchenko/mocogan/forks","keys_url":"https://api.github.com/repos/VladYushchenko/mocogan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VladYushchenko/mocogan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VladYushchenko/mocogan/teams","hooks_url":"https://api.github.com/repos/VladYushchenko/mocogan/hooks","issue_events_url":"https://api.github.com/repos/VladYushchenko/mocogan/issues/events{/number}","events_url":"https://api.github.com/repos/VladYushchenko/mocogan/events","assignees_url":"https://api.github.com/repos/VladYushchenko/mocogan/assignees{/user}","branches_url":"https://api.github.com/repos/VladYushchenko/mocogan/branches{/branch}","tags_url":"https://api.github.com/repos/VladYushchenko/mocogan/tags","blobs_url":"https://api.github.com/repos/VladYushchenko/mocogan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VladYushchenko/mocogan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VladYushchenko/mocogan/git/refs{/sha}","trees_url":"https://api.github.com/repos/VladYushchenko/mocogan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VladYushchenko/mocogan/statuses/{sha}","languages_url":"https://api.github.com/repos/VladYushchenko/mocogan/languages","stargazers_url":"https://api.github.com/repos/VladYushchenko/mocogan/stargazers","contributors_url":"https://api.github.com/repos/VladYushchenko/mocogan/contributors","subscribers_url":"https://api.github.com/repos/VladYushchenko/mocogan/subscribers","subscription_url":"https://api.github.com/repos/VladYushchenko/mocogan/subscription","commits_url":"https://api.github.com/repos/VladYushchenko/mocogan/commits{/sha}","git_commits_url":"https://api.github.com/repos/VladYushchenko/mocogan/git/commits{/sha}","comments_url":"https://api.github.com/repos/VladYushchenko/mocogan/comments{/number}","issue_comment_url":"https://api.github.com/repos/VladYushchenko/mocogan/issues/comments{/number}","contents_url":"https://api.github.com/repos/VladYushchenko/mocogan/contents/{+path}","compare_url":"https://api.github.com/repos/VladYushchenko/mocogan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VladYushchenko/mocogan/merges","archive_url":"https://api.github.com/repos/VladYushchenko/mocogan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VladYushchenko/mocogan/downloads","issues_url":"https://api.github.com/repos/VladYushchenko/mocogan/issues{/number}","pulls_url":"https://api.github.com/repos/VladYushchenko/mocogan/pulls{/number}","milestones_url":"https://api.github.com/repos/VladYushchenko/mocogan/milestones{/number}","notifications_url":"https://api.github.com/repos/VladYushchenko/mocogan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VladYushchenko/mocogan/labels{/name}","releases_url":"https://api.github.com/repos/VladYushchenko/mocogan/releases{/id}","deployments_url":"https://api.github.com/repos/VladYushchenko/mocogan/deployments","created_at":"2018-12-13T21:54:15Z","updated_at":"2018-12-14T06:49:38Z","pushed_at":"2018-12-14T06:49:37Z","git_url":"git://github.com/VladYushchenko/mocogan.git","ssh_url":"git@github.com:VladYushchenko/mocogan.git","clone_url":"https://github.com/VladYushchenko/mocogan.git","svn_url":"https://github.com/VladYushchenko/mocogan","homepage":null,"size":85285,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sergeytulyakov:master","ref":"master","sha":"54f84c3dc81781a70ab868098011248ceb35d24c","user":{"login":"sergeytulyakov","id":13735388,"node_id":"MDQ6VXNlcjEzNzM1Mzg4","avatar_url":"https://avatars3.githubusercontent.com/u/13735388?v=4","gravatar_id":"","url":"https://api.github.com/users/sergeytulyakov","html_url":"https://github.com/sergeytulyakov","followers_url":"https://api.github.com/users/sergeytulyakov/followers","following_url":"https://api.github.com/users/sergeytulyakov/following{/other_user}","gists_url":"https://api.github.com/users/sergeytulyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeytulyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeytulyakov/subscriptions","organizations_url":"https://api.github.com/users/sergeytulyakov/orgs","repos_url":"https://api.github.com/users/sergeytulyakov/repos","events_url":"https://api.github.com/users/sergeytulyakov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeytulyakov/received_events","type":"User","site_admin":false},"repo":{"id":95723627,"node_id":"MDEwOlJlcG9zaXRvcnk5NTcyMzYyNw==","name":"mocogan","full_name":"sergeytulyakov/mocogan","private":false,"owner":{"login":"sergeytulyakov","id":13735388,"node_id":"MDQ6VXNlcjEzNzM1Mzg4","avatar_url":"https://avatars3.githubusercontent.com/u/13735388?v=4","gravatar_id":"","url":"https://api.github.com/users/sergeytulyakov","html_url":"https://github.com/sergeytulyakov","followers_url":"https://api.github.com/users/sergeytulyakov/followers","following_url":"https://api.github.com/users/sergeytulyakov/following{/other_user}","gists_url":"https://api.github.com/users/sergeytulyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeytulyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeytulyakov/subscriptions","organizations_url":"https://api.github.com/users/sergeytulyakov/orgs","repos_url":"https://api.github.com/users/sergeytulyakov/repos","events_url":"https://api.github.com/users/sergeytulyakov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeytulyakov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sergeytulyakov/mocogan","description":"MoCoGAN: Decomposing Motion and Content for Video Generation","fork":false,"url":"https://api.github.com/repos/sergeytulyakov/mocogan","forks_url":"https://api.github.com/repos/sergeytulyakov/mocogan/forks","keys_url":"https://api.github.com/repos/sergeytulyakov/mocogan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sergeytulyakov/mocogan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sergeytulyakov/mocogan/teams","hooks_url":"https://api.github.com/repos/sergeytulyakov/mocogan/hooks","issue_events_url":"https://api.github.com/repos/sergeytulyakov/mocogan/issues/events{/number}","events_url":"https://api.github.com/repos/sergeytulyakov/mocogan/events","assignees_url":"https://api.github.com/repos/sergeytulyakov/mocogan/assignees{/user}","branches_url":"https://api.github.com/repos/sergeytulyakov/mocogan/branches{/branch}","tags_url":"https://api.github.com/repos/sergeytulyakov/mocogan/tags","blobs_url":"https://api.github.com/repos/sergeytulyakov/mocogan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sergeytulyakov/mocogan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sergeytulyakov/mocogan/git/refs{/sha}","trees_url":"https://api.github.com/repos/sergeytulyakov/mocogan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sergeytulyakov/mocogan/statuses/{sha}","languages_url":"https://api.github.com/repos/sergeytulyakov/mocogan/languages","stargazers_url":"https://api.github.com/repos/sergeytulyakov/mocogan/stargazers","contributors_url":"https://api.github.com/repos/sergeytulyakov/mocogan/contributors","subscribers_url":"https://api.github.com/repos/sergeytulyakov/mocogan/subscribers","subscription_url":"https://api.github.com/repos/sergeytulyakov/mocogan/subscription","commits_url":"https://api.github.com/repos/sergeytulyakov/mocogan/commits{/sha}","git_commits_url":"https://api.github.com/repos/sergeytulyakov/mocogan/git/commits{/sha}","comments_url":"https://api.github.com/repos/sergeytulyakov/mocogan/comments{/number}","issue_comment_url":"https://api.github.com/repos/sergeytulyakov/mocogan/issues/comments{/number}","contents_url":"https://api.github.com/repos/sergeytulyakov/mocogan/contents/{+path}","compare_url":"https://api.github.com/repos/sergeytulyakov/mocogan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sergeytulyakov/mocogan/merges","archive_url":"https://api.github.com/repos/sergeytulyakov/mocogan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sergeytulyakov/mocogan/downloads","issues_url":"https://api.github.com/repos/sergeytulyakov/mocogan/issues{/number}","pulls_url":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls{/number}","milestones_url":"https://api.github.com/repos/sergeytulyakov/mocogan/milestones{/number}","notifications_url":"https://api.github.com/repos/sergeytulyakov/mocogan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sergeytulyakov/mocogan/labels{/name}","releases_url":"https://api.github.com/repos/sergeytulyakov/mocogan/releases{/id}","deployments_url":"https://api.github.com/repos/sergeytulyakov/mocogan/deployments","created_at":"2017-06-29T00:46:24Z","updated_at":"2018-12-14T12:06:42Z","pushed_at":"2018-12-14T12:10:11Z","git_url":"git://github.com/sergeytulyakov/mocogan.git","ssh_url":"git@github.com:sergeytulyakov/mocogan.git","clone_url":"https://github.com/sergeytulyakov/mocogan.git","svn_url":"https://github.com/sergeytulyakov/mocogan","homepage":null,"size":85283,"stargazers_count":199,"watchers_count":199,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":54,"open_issues":3,"watchers":199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/18"},"html":{"href":"https://github.com/sergeytulyakov/mocogan/pull/18"},"issue":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/issues/18"},"comments":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/sergeytulyakov/mocogan/statuses/c603571b626915eee42afa707440dc3cfba3d0db"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"sergeytulyakov","id":13735388,"node_id":"MDQ6VXNlcjEzNzM1Mzg4","avatar_url":"https://avatars3.githubusercontent.com/u/13735388?v=4","gravatar_id":"","url":"https://api.github.com/users/sergeytulyakov","html_url":"https://github.com/sergeytulyakov","followers_url":"https://api.github.com/users/sergeytulyakov/followers","following_url":"https://api.github.com/users/sergeytulyakov/following{/other_user}","gists_url":"https://api.github.com/users/sergeytulyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeytulyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeytulyakov/subscriptions","organizations_url":"https://api.github.com/users/sergeytulyakov/orgs","repos_url":"https://api.github.com/users/sergeytulyakov/repos","events_url":"https://api.github.com/users/sergeytulyakov/events{/privacy}","received_events_url":"https://api.github.com/users/sergeytulyakov/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":8,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"sergeytulyakov"}}