This commit is contained in:
wassname
2020-11-01 15:36:32 +08:00
parent fa1bcb0081
commit 27d4cde5bd
7 changed files with 84 additions and 203 deletions
-6
View File
@@ -40,12 +40,6 @@ class Transformer(nn.Module):
target = torch.cat([future_x, future_y_fake], -1).detach()
x = torch.cat([context, target * 1], 1).detach()
# Masks
x_mask = torch.isfinite(x) & (x != self.nan_value)
x[~x_mask] = 0
x = x.detach()
x_key_padding_mask = ~x_mask.any(-1)
x = self.enc_emb(x).permute(1, 0, 2)
S, B, _ = x.shape