DiscoGAN-pytorch
DiscoGAN-pytorch copied to clipboard
Using a target size (torch.Size([4])) that is different to the input size (torch.Size([4, 169])) is deprecated. Please ensure they have the same size.
(base) D:\DiscoGAN>python main.py --dataset=siys2simk --input_scale_size 256 --batch_size 4 --a_grayscale True --b_grayscale True --num_worker 1 --num_gpu=0
[*] MODEL dir: ./logs\siys2simk_2022-08-26_11-17-52
[*] PARAM path: ./logs\siys2simk_2022-08-26_11-17-52\params.json
0%| | 0/500000 [00:00<?, ?it/s]
Traceback (most recent call last):
File "D:\DiscoGAN\main.py", line 41, in <module>
main(config)
File "D:\DiscoGAN\main.py", line 33, in main
trainer.train()
File "D:\DiscoGAN\trainer.py", line 200, in train
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)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\loss.py", line 613, in forward
return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\functional.py", line 3074, in binary_cross_entropy
raise ValueError(
ValueError: Using a target size (torch.Size([4])) that is different to the input size (torch.Size([4, 169])) is deprecated. Please ensure they have the same size.