Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
4d33715d
Commit
4d33715d
authored
May 17, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better eval
parent
a1d1a4ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
examples/Atari2600/DQN.py
examples/Atari2600/DQN.py
+1
-1
tensorpack/predict.py
tensorpack/predict.py
+1
-0
No files found.
examples/Atari2600/DQN.py
View file @
4d33715d
...
...
@@ -206,7 +206,7 @@ def eval_model_multiprocess(model_path, romfile):
self
.
outq
.
put
(
tot_reward
)
tot_reward
=
0
NR_PROC
=
m
ultiprocessing
.
cpu_count
()
//
2
NR_PROC
=
m
in
(
multiprocessing
.
cpu_count
()
//
2
,
10
)
procs
=
[]
q
=
multiprocessing
.
Queue
()
for
k
in
range
(
NR_PROC
):
...
...
tensorpack/predict.py
View file @
4d33715d
...
...
@@ -116,6 +116,7 @@ class ParallelPredictWorker(multiprocessing.Process):
os
.
environ
[
'CUDA_VISIBLE_DEVICES'
]
=
self
.
gpuid
else
:
logger
.
info
(
"Worker {} uses CPU"
.
format
(
self
.
idx
))
os
.
environ
[
'CUDA_VISIBLE_DEVICES'
]
=
''
G
=
tf
.
Graph
()
# build a graph for each process, because they don't need to share anything
with
G
.
as_default
(),
tf
.
device
(
'/gpu:0'
if
self
.
gpuid
>=
0
else
'/cpu:0'
):
if
self
.
idx
!=
0
:
...
...
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