Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.pytorch
Commits
fdabcc91
Commit
fdabcc91
authored
Sep 17, 2019
by
Guillaume HEUSCH
Browse files
Merge branch 'fix_py37_compatibility' into 'master'
change async to non_blocking Closes
#24
See merge request
!39
parents
5878e035
57ebc7ce
Pipeline
#34467
passed with stages
in 17 minutes and 1 second
Changes
1
Pipelines
5
Show whitespace changes
Inline
Side-by-side
bob/learn/pytorch/preprocessor/audio/DltResNet.py
View file @
fdabcc91
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment