Commit 4212d4da authored by Anthony Larcher's avatar Anthony Larcher
Browse files

sad

parent b4959f8a
......@@ -17,8 +17,8 @@ class SAD_Dataset(Dataset):
def __init__(self, mdtm_file, features_server, batch_size=512, duration=3.2, step=0.8, uem_file=None, shuffle=False):
self.batch_size = batch_size
self.duration = duration
self.step = step
self.duration = duration * 100
self.step = step * 100
self.features_server = features_server
train_list = {}
......@@ -188,7 +188,7 @@ class SAD_RNN():
x = []
X = torch.tensor([]).to(device)
for i in range(0, len(features) - self.duration, self.step):
x.append(features[i:i + self.duration] )
x.append(features[i:i + self.duration])
if i + self.step > len(features) - self.duration:
pad_size = self.batch_size - len(x)
pad = [[[0] * self.input_size] * self.duration] * pad_size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment