Commit c4f99b0a authored by Anthony Larcher's avatar Anthony Larcher
Browse files

debug

parent f2de4f4e
......@@ -169,6 +169,7 @@ class AddNoise(object):
noises = []
left = original_duration
while left > 0:
# select noise file at random
file = random.choice(self.noises)
......
......@@ -1225,7 +1225,7 @@ def cross_validation(model, validation_loader, device, validation_shape, mask, m
accuracy += (torch.argmax(batch_predictions.data, 1) == target).sum()
loss += criterion(batch_predictions, target)
embeddings[batch_idx * batch_size:batch_idx * batch_size + batch_predictions.shape[0],:] = batch_embeddings.detach().cpu()
#classes[batch_idx * batch_size:batch_idx * batch_size + batch_predictions.shape[0]] = target.detach().cpu()
classes[batch_idx * batch_size:batch_idx * batch_size + batch_predictions.shape[0]] = target.detach().cpu()
#print(classes.shape[0])
local_device = "cpu" if embeddings.shape[0] > 3e4 else device
......
Supports Markdown
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