{"action":"created","issue":{"url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks/issues/5","repository_url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks","labels_url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks/issues/5/comments","events_url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks/issues/5/events","html_url":"https://github.com/AntreasAntoniou/MatchingNetworks/issues/5","id":270511327,"number":5,"title":"maybe a data feeder bug","user":{"login":"kinlog","id":16189989,"avatar_url":"https://avatars2.githubusercontent.com/u/16189989?v=4","gravatar_id":"","url":"https://api.github.com/users/kinlog","html_url":"https://github.com/kinlog","followers_url":"https://api.github.com/users/kinlog/followers","following_url":"https://api.github.com/users/kinlog/following{/other_user}","gists_url":"https://api.github.com/users/kinlog/gists{/gist_id}","starred_url":"https://api.github.com/users/kinlog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinlog/subscriptions","organizations_url":"https://api.github.com/users/kinlog/orgs","repos_url":"https://api.github.com/users/kinlog/repos","events_url":"https://api.github.com/users/kinlog/events{/privacy}","received_events_url":"https://api.github.com/users/kinlog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-02T02:20:29Z","updated_at":"2017-11-03T15:04:10Z","closed_at":null,"author_association":"NONE","body":"file: data.py -> class: OmniglotNShotDataset -> function: sample_new_batch\r\n``` python\r\nfor i in range(self.batch_size):\r\n            classes_idx = np.arange(data_pack.shape[0])\r\n            samples_idx = np.arange(data_pack.shape[1])\r\n            choose_classes = np.random.choice(classes_idx, size=self.classes_per_set, replace=False)\r\n            choose_label = np.random.choice(self.classes_per_set, size=1)\r\n            choose_samples = np.random.choice(samples_idx, size=self.samples_per_class+1, replace=False)\r\n\r\n            x_temp = data_pack[choose_classes]\r\n            x_temp = x_temp[:, choose_samples]\r\n            y_temp = np.arange(self.classes_per_set)\r\n            support_set_x[i] = x_temp[:, :-1]\r\n            support_set_y[i] = np.expand_dims(y_temp[:], axis=1)\r\n            target_x[i] = x_temp[choose_label, -1]\r\n            target_y[i] = y_temp[choose_label]\r\n```\r\nI check this code carefully, and I found something unreasonable here.\r\nYou choose the classes first and then the samples, the problem here is that you always choose the same index of samples in class.\r\nFor example, after you choose 20 classes, there are 20 samples in every class, the right choice is randomly choose samples in every class, but the current code runs with choosing the i-th sample in every classes.\r\n\r\nWaiting for your reply."},"comment":{"url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks/issues/comments/341729352","html_url":"https://github.com/AntreasAntoniou/MatchingNetworks/issues/5#issuecomment-341729352","issue_url":"https://api.github.com/repos/AntreasAntoniou/MatchingNetworks/issues/5","id":341729352,"user":{"login":"AntreasAntoniou","id":10792502,"avatar_url":"https://avatars3.githubusercontent.com/u/10792502?v=4","gravatar_id":"","url":"https://api.github.com/users/AntreasAntoniou","html_url":"https://github.com/AntreasAntoniou","followers_url":"https://api.github.com/users/AntreasAntoniou/followers","following_url":"https://api.github.com/users/AntreasAntoniou/following{/other_user}","gists_url":"https://api.github.com/users/AntreasAntoniou/gists{/gist_id}","starred_url":"https://api.github.com/users/AntreasAntoniou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntreasAntoniou/subscriptions","organizations_url":"https://api.github.com/users/AntreasAntoniou/orgs","repos_url":"https://api.github.com/users/AntreasAntoniou/repos","events_url":"https://api.github.com/users/AntreasAntoniou/events{/privacy}","received_events_url":"https://api.github.com/users/AntreasAntoniou/received_events","type":"User","site_admin":false},"created_at":"2017-11-03T15:04:10Z","updated_at":"2017-11-03T15:04:10Z","author_association":"OWNER","body":"Ok yes. We can shuffle the samples as well. The second method is not as efficient computationally I think. As long as we shuffle the samples every, let's say 50 batches they should be relatively random."}}
{"actor":{"display_login":"AntreasAntoniou"}}