The size of tensor a (823) must match the size of tensor b (784) at non-singleton dimension 1
dj-kefir-siorbacz opened this issue · 2 comments
dj-kefir-siorbacz commented
Error related to #10 (comment)
Started creating data pointers...
Finished creating data pointers.
Warning: Number of gating features (130) and main features (693) are not the same as input features (784).
Traceback (most recent call last):
File "/home/jupyter/DeepLearningONNX/Models/GNN/InBetweeningNetwork.py", line 106, in <module>
yPred, gPred, w0, w1, w2 = network(xBatch)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/jupyter/DeepLearningONNX/Models/GNN/../../../DeepLearningONNX/Models/GNN/InBetweeningNetwork.py", line 176, in forward
x = utility.Normalize(x, self.Xnorm)
File "/home/jupyter/DeepLearningONNX/Models/GNN/../../../DeepLearningONNX/Library/Utility.py", line 251, in Normalize
return (X - mean) / std
RuntimeError: The size of tensor a (823) must match the size of tensor b (784) at non-singleton dimension 1
paulstarke commented
You'll need to change the index mapping depending on your export. Have a look at InputLabels.txt
. Feed the phase features (#130) into the gating network and all other features into the motion prediction network.
In this example you might look for:
gating_indices = torch.tensor([(654+ i) for i in range(130)]) #index where phase starts
main_indices = torch.tensor([(i) for i in range(654)])
If this doesn't work please post your InputLabels.txt
here.
dj-kefir-siorbacz commented
Yeah, I did it and it works!