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

RuntimeError #5

Open
xytywh opened this issue May 6, 2019 · 5 comments
Open

RuntimeError #5

xytywh opened this issue May 6, 2019 · 5 comments

Comments

@xytywh
Copy link

xytywh commented May 6, 2019

when I run the program,I meet blow error:

RuntimeError :Expected 4-dimensional input for 4-dimensional weight [30,1,5,5],but got 5-
dimensional input of size [16,2,1,256,256] instead

I don't know why?please help me!

@HarryAB
Copy link

HarryAB commented Oct 10, 2019

Have you solved the problem?I have the same problem as you

@wanyan-li
Copy link

Have you solved the problem?I have the same problem as you

hello, have you solved this problem?

@niefengxxx
Copy link

have anyone solved this problem?................

@Yogurt2019
Copy link

Same problem! Have anyone solved it?

@Yogurt2019
Copy link

Yogurt2019 commented Jun 21, 2020

I solved it
just add three lines under train()->images, labels = images.cuda(), labels.cuda():

`shape = list(images.shape)

images = images.view(shape[0]*shape[1], *shape[2:])

labels = labels.view(-1)`

just combine the 1st and the 2nd dimension of images and labels.

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

5 participants