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

clean version of VAD miss computation of validation accuracy

parent 218ade91
......@@ -441,9 +441,8 @@ def cross_validation(model, validation_loader, device):
output = model(data.to(device))
output = output.permute(1, 2, 0)
target = target.permute(1, 0)
nbpoint = output.shape[0]
loss = criterion(output, target.to(device))
loss += criterion(output, target.to(device))
rc, pr, acc = calc_recall(output.data, target, device)
recall += rc.item()
......@@ -465,6 +464,7 @@ def cross_validation(model, validation_loader, device):
100.0 * precision / ((batch_idx + 1)),
f_measure)
)
return accuracy, loss
def calc_recall(output,target,device):
......
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