mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-17 11:32:26 +08:00
mask with diagonal=1
This commit is contained in:
@@ -83,7 +83,7 @@ class TransformerNetwork(nn.Module):
|
||||
|
||||
# mask
|
||||
self.register_buffer(
|
||||
"tgt_mask", torch.triu(torch.ones((prediction_length, prediction_length)))
|
||||
"tgt_mask", torch.triu(torch.ones((prediction_length, prediction_length)), diagonal=1)
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user