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
ModelZoo
ResNet50_tensorflow
Commits
dab1517e
Commit
dab1517e
authored
Aug 31, 2016
by
kaiix
Browse files
Allow using a single GPU
parent
761c59c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
textsum/seq2seq_attention_model.py
textsum/seq2seq_attention_model.py
+2
-1
No files found.
textsum/seq2seq_attention_model.py
View file @
dab1517e
...
...
@@ -105,7 +105,8 @@ class Seq2SeqAttentionModel(object):
if
self
.
_num_gpus
==
0
:
return
''
dev
=
'/gpu:%d'
%
self
.
_cur_gpu
self
.
_cur_gpu
=
(
self
.
_cur_gpu
+
1
)
%
(
self
.
_num_gpus
-
1
)
if
self
.
_num_gpus
>
1
:
self
.
_cur_gpu
=
(
self
.
_cur_gpu
+
1
)
%
(
self
.
_num_gpus
-
1
)
return
dev
def
_get_gpu
(
self
,
gpu_id
):
...
...
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