Caenorst / YeNet-Pytorch

Pytorch implementation of "Deep Learning Hierarchical Representations for Image Steganalysis"
52 stars 9 forks source link

RuntimeError #5

Open xytywh opened 5 years ago

xytywh commented 5 years ago

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 commented 5 years ago

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

wanyan-li commented 4 years ago

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

hello, have you solved this problem?

niefengxxx commented 4 years ago

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

Yogurt2019 commented 4 years ago

Same problem! Have anyone solved it?

Yogurt2019 commented 4 years ago

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.