Skip to content

Commit 5364539

Browse files
authored
Merge pull request dennybritz#111 from himanshusahni/master
bind worker within lambda to avoid running worker twice
2 parents 762f34c + 1f04c1d commit 5364539

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PolicyGradient/a3c/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def make_env(wrap=True):
125125
# Start worker threads
126126
worker_threads = []
127127
for worker in workers:
128-
worker_fn = lambda: worker.run(sess, coord, FLAGS.t_max)
128+
worker_fn = lambda worker=worker: worker.run(sess, coord, FLAGS.t_max)
129129
t = threading.Thread(target=worker_fn)
130130
t.start()
131131
worker_threads.append(t)

0 commit comments

Comments
 (0)