Closed ntubiolin closed 4 years ago
Hi thanks for your comment, I think you are right. After further investigation, I will correct it.
OK, thanks!
@ntubiolin @nnzhan hello, im getting this error:
return _VF.einsum(equation, operands)
RuntimeError: size of dimension does not match previous size, operand 1, dim 0
in
MTGNN-master/layer.py", line 14, in forward
x = torch.einsum('ncvl,vw->ncwl',(x,A))
have you got any idea on how i could solve it?
@lorrp1 Can you print out the shape of X and A?
@ntubiolin @nnzhan Hello,I had the same problem
return torch._C._VariableFunctions.einsum(equation, operands) RuntimeError: size of dimension does not match previous size, operand 1, dim 1
in
MTGNN-master/layer.py", line 14, in forward x = torch.einsum('ncvl,vw->ncwl',(x,A))
and I printed out the shapes of X and A
torch.Size([64, 32, 206, 13]) torch.Size([207, 207])
I'm using the METR-LA dataset
@zhp66 Were you able to solve this?
Hi! I like your great work! But I have one question when reading your source code:
https://github.com/nnzhan/MTGNN/blob/d9d4235433a0395768599471977c64c54bff40ea/layer.py#L14
Should the above code be changed into
x = torch.einsum('ncvl,wv->ncwl',(x,A))
so that it would be consistent with the definition in https://github.com/nnzhan/MTGNN/blob/d9d4235433a0395768599471977c64c54bff40ea/layer.py#L45 (every row in the adjacent matrix sum up to 1)?Thanks!