DiscoGAN-pytorch icon indicating copy to clipboard operation
DiscoGAN-pytorch copied to clipboard

torch size

Open jhaseon opened this issue 5 years ago • 1 comments

getting this message:

0%| | 1/50000 [00:03<55:08:42, 3.97s/it]C:\Users\Shadow\Anaconda3\lib\site-packages\torch\nn\modules\loss.py:512: UserWarning: Using a target size (torch.Size([200])) that is different to the input size (torch.Size([200, 1])) is deprecated. Please ensure they have the same size.

jhaseon avatar May 16 '19 05:05 jhaseon

adding .squeeze(1) can fix that problem like: l_d_A_real, l_d_A_fake = bce(self.D_A(x_A).squeeze(1), real_tensor), bce(self.D_A(x_BA).squeeze(1), fake_tensor)

imkelt avatar Jul 25 '22 05:07 imkelt