{"action":"created","issue":{"url":"https://api.github.com/repos/kayamin/DR-GAN/issues/2","repository_url":"https://api.github.com/repos/kayamin/DR-GAN","labels_url":"https://api.github.com/repos/kayamin/DR-GAN/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/kayamin/DR-GAN/issues/2/comments","events_url":"https://api.github.com/repos/kayamin/DR-GAN/issues/2/events","html_url":"https://github.com/kayamin/DR-GAN/issues/2","id":276800661,"number":2,"title":"About Loss Function","user":{"login":"timho102003","id":13211302,"avatar_url":"https://avatars3.githubusercontent.com/u/13211302?v=4","gravatar_id":"","url":"https://api.github.com/users/timho102003","html_url":"https://github.com/timho102003","followers_url":"https://api.github.com/users/timho102003/followers","following_url":"https://api.github.com/users/timho102003/following{/other_user}","gists_url":"https://api.github.com/users/timho102003/gists{/gist_id}","starred_url":"https://api.github.com/users/timho102003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timho102003/subscriptions","organizations_url":"https://api.github.com/users/timho102003/orgs","repos_url":"https://api.github.com/users/timho102003/repos","events_url":"https://api.github.com/users/timho102003/events{/privacy}","received_events_url":"https://api.github.com/users/timho102003/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-26T05:17:39Z","updated_at":"2017-12-11T13:54:23Z","closed_at":null,"author_association":"NONE","body":"Hi\r\nIm new to GAN and also studying paper DRGAN. Im wondering that the loss function ur using in the implementation is the same as in the paper(GAN has it two player loss calculation but ur using cross entropy instead)? If Im wrong, please correct me tks!!!!!\r\n>> loss_criterion = nn.CrossEntropyLoss()\r\n>> loss_criterion_gan = nn.BCEWithLogitsLoss()"},"comment":{"url":"https://api.github.com/repos/kayamin/DR-GAN/issues/comments/350730321","html_url":"https://github.com/kayamin/DR-GAN/issues/2#issuecomment-350730321","issue_url":"https://api.github.com/repos/kayamin/DR-GAN/issues/2","id":350730321,"user":{"login":"timho102003","id":13211302,"avatar_url":"https://avatars3.githubusercontent.com/u/13211302?v=4","gravatar_id":"","url":"https://api.github.com/users/timho102003","html_url":"https://github.com/timho102003","followers_url":"https://api.github.com/users/timho102003/followers","following_url":"https://api.github.com/users/timho102003/following{/other_user}","gists_url":"https://api.github.com/users/timho102003/gists{/gist_id}","starred_url":"https://api.github.com/users/timho102003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timho102003/subscriptions","organizations_url":"https://api.github.com/users/timho102003/orgs","repos_url":"https://api.github.com/users/timho102003/repos","events_url":"https://api.github.com/users/timho102003/events{/privacy}","received_events_url":"https://api.github.com/users/timho102003/received_events","type":"User","site_admin":false},"created_at":"2017-12-11T13:54:23Z","updated_at":"2017-12-11T13:54:23Z","author_association":"NONE","body":"I also implement dataloader part and allow the library pandas to load image by using .csv file instead of .npy files to Generate_Image.py. However, a new issue pop out which I can't figure it out the reason.\r\n## 1. In training phase (take single-DRGAN as example):\r\n`generated = G_model(batch_image, pose_code, fixed_noise)   # Generatorでイメージ生成`\r\nto generate fake images \r\n## 2. While in -generate phase (take single-DRGAN as example):\r\n### main.py:\r\n`# Load Model (in my case --> snapshot/single/epoch99)`\r\n`D = torch.load('{}_D.pt'.format(args.snapshot))`\r\n`G = torch.load('{}_G.pt'.format(args.snapshot))`\r\n### Generate_Image.py:\r\n`# Generatorでイメージ生成`\r\n`generated = G_model(batch_image, batch_pose_code, fixed_noise)`\r\nWhen run to the code `generated = G_model(batch_image, batch_pose_code, fixed_noise)` in Generate_Image.py, an error occurred (The reason that I can't figure it out is that in training phase, it also get thru the same process and do not trigger the error down below):\r\nERROR-->\r\n>   File \"main_v2.py\", line 149, in <module>\r\n    features = Generate_Image(D, G, args)\r\n  File \"/home/avlab/TIM/DRGAN/Generate_Image.py\", line 75, in Generate_Image\r\n    generated = G_model(batch_image, batch_pose_code, fixed_noise)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/avlab/TIM/DRGAN/model/single_DR_GAN_model.py\", line 255, in forward\r\n    x = self.G_enc_convLayers(input) # Bxchx96x96 -> Bx320x1x1\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/container.py\", line 67, in forward\r\n    input = module(input)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/padding.py\", line 77, in forward\r\n    return F.pad(input, self.padding, 'constant', self.value)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 366, in __getattr__\r\n    type(self).__name__, name))\r\nAttributeError: 'ZeroPad2d' object has no attribute 'value'\r\n\r\n\r\n`\r\n\r\n"}}
{"actor":{"display_login":"timho102003"}}