Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Error While Training PixelSNAIL #64

Open
barisbatuhan opened this issue Apr 26, 2021 · 1 comment
Open

Runtime Error While Training PixelSNAIL #64

barisbatuhan opened this issue Apr 26, 2021 · 1 comment

Comments

@barisbatuhan
Copy link

Hi,

I am training the PixelSNAIL network with 128x128 image sizes and currently having the runtime error below:

background = self.background[:, :, :height, :].expand(batch, 2, height, width)
RuntimeError: The expanded size of the tensor (16) must match the existing size (32) at
non-singleton dimension 3.  Target sizes: [64, 2, 16, 16].  Tensor sizes: [1, 2, 16, 32]

The problem is caused by the the line 408 in pixelsnail.py:

background = self.background[:, :, :height, :].expand(batch, 2, height, width)

If I change the line to:

background = self.background[:, :, :height, :width].expand(batch, 2, height, width)

the code works without any errors but I am not sure if that is the correct way to fix the error. How can this error be fixed?

@rosinality
Copy link
Owner

I think you can change shape argument of PixelSNAIL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants