denoising-diffusion-pytorch
denoising-diffusion-pytorch copied to clipboard
Error of dimmensions while upsampling in class Unet1D
I am getting the following error in the upsampling of class Unet1D : x = torch.cat((x, h.pop()), dim = 1)
. Is it related to conditional generation? If yes, then where exactly we give the condition? I have a (1,15) dim 1D input and (1) dim condition.
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[<ipython-input-145-f3b72fab93a4>](https://localhost:8080/#) in <cell line: 1>()
13 continue
14
---> 15 z = unet(batch_noisy, t)
16
17 predicted_noise = z
1 frames
[<ipython-input-139-5da71058ec56>](https://localhost:8080/#) in forward(self, x, time, x_self_cond)
118 print(h[len(h)-1])
119
--> 120 x = torch.cat((x, h.pop()), dim = 1)
121 x = block1(x, t)
122
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 3 for tensor number 1 in the list.
Are you referring to x_self_cond
? Because I can't find a label condition under Unet1D
.
If so, it appears according to line 348 here, if x_self_cond
is not None
, its shape must match that of your input x
.
I have the same question, do you solve it? If so, plz tell me how can I fix the problem.