[fix] PPE max_len
This commit is contained in:
1 parent
2cba31e6bc
commit
5fcb839ad4
4 files changed
+17
-11
No files matched your search
@@ -34,6 +34,7 @@ class MotionEvalDataset(Dataset):
|
||||
|
||||
|
||||
def __len__(self):
|
||||
# return min(100, self.annodb_accums[-1])
|
||||
return self.annodb_accums[-1]
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class MotionLiveDataset(Dataset):
|
||||
if self.phase == "train":
|
||||
return 20000
|
||||
elif self.phase == "valid":
|
||||
return 3000 #3000
|
||||
return 2000 #3000
|
||||
else:
|
||||
return 100
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ class FaceFormer(nn.Module):
|
||||
self.motion_tail = nn.Linear(self.dim_hidden, self.dim_motion)
|
||||
|
||||
# positional encoding
|
||||
self.PPE = PeriodicPositionalEncoding(self.dim_hidden, period = self.period)
|
||||
self.PPE = PeriodicPositionalEncoding(self.dim_hidden, period = self.period, max_seq_len=self.max_seq_len)
|
||||
|
||||
|
||||
# Transformer
|
||||
_decoder_layer = nn.TransformerDecoderLayer(d_model=self.dim_hidden, nhead=4, dim_feedforward=2*self.dim_hidden, batch_first=True)
|
||||
|
||||
Reference in new issue
Block a user