janericlenssen / group_equivariant_capsules_pytorch

Pytorch implementation of Group Equivariant Capsule Networks
29 stars 8 forks source link

some problems about space_to_depth #6

Open pengnianhhh opened 3 years ago

pengnianhhh commented 3 years ago

@mrjel Hi,thanks for sharing this wonderful repo.I'm a beginner to the Capsule Network.

When I run the affnist.py,I got something wrong. It was about the mismatching of the data format.(The function space_to_depth in pooling_capsule_layer.py)

The wrong statement: "t_t.contiguous().view(batch_size, d_height, 1, d_depth, s_posev) RuntimeError: shape '[48, 2, 1, 256, 1]' is invalid for input of size 18432"

I have found the value of t_t when the error occured,which was "[48,3,2,64,1]".It's obviously that there got something wrong. But I didn't change any code while I got the wrong result,and I don't know how to fix it. Could you help me?Thank you very much!~