Question about key_padding_mask in TSTPlus #375
Unanswered
michaelyma12
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Thanks for the great work on the library.
Noticed something that confused me in the source for TSTPlus.
I get how the
key_madding_mask
is fed through the layers in _TSTBackbone, which outputs a tensor of shape:(batch_size, n_features, time_dimension).
Accordingly, all the rows along the time dimension that were padded become 0s.
The part that confuses me is how the subsequent head module produced by
self.create_head(...)
simply feeds the flattened tensor into aLinBnDrop
layer.Specifically referencing this block in
tsai.models.TSTPlus
:Wouldn't the 0 vectors also be fed in? Doesn't that hinder the model in some way? Is this simply the best workable solution?
Any insight would be appreciated 🙇
Beta Was this translation helpful? Give feedback.
All reactions