Error in test using a random image
ParadoxRobotics opened this issue · comments
Hi !
Thank you for your impressive implementation of the Local relation layer.
I try to use it in a normal use case, but unfortunately your code doesn't work.
I write the following code and parameters :
img = torch.randn(1, 3, 64, 64)
att_layer = LocalRelationalLayer(channels = 3, k = 1, stride = 1, m = 1, padding = 0)
y = att_layer(img)
but I get following error for the ending line :
File "Deep_Compositional_Networks.py", line 99, in forward
pre_output = (ck * x_unfold).view(x.shape[0], x.shape[1], -1, x_unfold.shape[-2] // x.shape[1])
RuntimeError: shape '[1, 3, -1, 1365]' is invalid for input of size 12288
If you have any idea why this configuration raise this error...?
Thank in advance for your help !
You can refer to this example: #7 (comment)