Chiaraplizz / ST-TR

Spatial Temporal Transformer Network for Skeleton-Based Activity Recognition
MIT License
294 stars 57 forks source link

rel_to_abs function error #6

Closed imj2185 closed 3 years ago

imj2185 commented 3 years ago

Hello,

I was trying to use relative argument to add relative positional encoding in tcn_unit_attention but there is a dimension mismatch error in the function rel_to_abs.

File "/home/dusko/Documents/projects/ST-TR/code/st_gcn/net/temporal_transformer.py", line 283, in rel_to_abs flat_x = torch.reshape(x, (B, Nh, L 2 L)) RuntimeError: shape '[400, 8, 45000]' is invalid for input of size 72000000

Did anyone train the model with the positional encoding? I would appreicate any reply.

Chiaraplizz commented 3 years ago

Hello,

I was trying to use relative argument to add relative positional encoding in tcn_unit_attention but there is a dimension mismatch error in the function rel_to_abs.

File "/home/dusko/Documents/projects/ST-TR/code/st_gcn/net/temporal_transformer.py", line 283, in rel_to_abs flat_x = torch.reshape(x, (B, Nh, L 2 L)) RuntimeError: shape '[400, 8, 45000]' is invalid for input of size 72000000

Did anyone train the model with the positional encoding? I would appreicate any reply.

Hello!

I used the relative positional encoding at the very beginning of my project, and they did not demonstrate to give boost in performance, thus I did not introduced them in the end. However, I will give a look in the next days to the code and let you know if I can find the problem.

Chiara