Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
bf6d0025
Commit
bf6d0025
authored
Nov 22, 2018
by
VoVAllen
Committed by
Minjie Wang
Nov 21, 2018
Browse files
[Bugfix] fix gpu manual choice for capsule example (#164)
parent
0ec1a492
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/capsule/main.py
examples/pytorch/capsule/main.py
+1
-1
No files found.
examples/pytorch/capsule/main.py
View file @
bf6d0025
...
@@ -61,7 +61,7 @@ def main():
...
@@ -61,7 +61,7 @@ def main():
torch
.
manual_seed
(
args
.
seed
)
torch
.
manual_seed
(
args
.
seed
)
device
=
torch
.
device
(
"cuda
:1
"
if
use_cuda
else
"cpu"
)
device
=
torch
.
device
(
"cuda"
if
use_cuda
else
"cpu"
)
kwargs
=
{
'num_workers'
:
1
,
'pin_memory'
:
True
}
if
use_cuda
else
{}
kwargs
=
{
'num_workers'
:
1
,
'pin_memory'
:
True
}
if
use_cuda
else
{}
train_loader
=
torch
.
utils
.
data
.
DataLoader
(
train_loader
=
torch
.
utils
.
data
.
DataLoader
(
...
...
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