From 57ebc7ce7365e6908fe1cd54a67e512457019d58 Mon Sep 17 00:00:00 2001
From: ssarfjoo <saeed.sarfjoo@idiap.ch>
Date: Tue, 17 Sep 2019 10:33:49 +0200
Subject: [PATCH] change async to non_blocking
---
bob/learn/pytorch/preprocessor/audio/DltResNet.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bob/learn/pytorch/preprocessor/audio/DltResNet.py b/bob/learn/pytorch/preprocessor/audio/DltResNet.py
index 01c928a..cefb9d7 100644
--- a/bob/learn/pytorch/preprocessor/audio/DltResNet.py
+++ b/bob/learn/pytorch/preprocessor/audio/DltResNet.py
@@ -148,7 +148,7 @@ class DltResNetExtractor(Preprocessor):
with torch.no_grad():
in_batch = numpy.array(batch)
if cuda_flag == 1:
- input_var = torch.autograd.Variable(torch.Tensor(in_batch).unsqueeze(1).cuda(async=True))
+ input_var = torch.autograd.Variable(torch.Tensor(in_batch).unsqueeze(1).cuda(non_blocking=True))
else:
input_var = torch.autograd.Variable(torch.Tensor(in_batch).unsqueeze(1))
fX = model(input_var).data.cpu().numpy()
--
GitLab