Skip to content

Commit 49b5ec0

Browse files
authored
Fixed pytorch cpu parallelism error
1 parent a8bd4f9 commit 49b5ec0

File tree

1 file changed

+1
-0
lines changed
  • agents/actor_critic_agents

1 file changed

+1
-0
lines changed

agents/actor_critic_agents/A3C.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def set_seeds(self, worker_num):
109109

110110
def run(self):
111111
"""Starts the worker"""
112+
torch.set_num_threads(1)
112113
for ep_ix in range(self.episodes_to_run):
113114
with self.optimizer_lock:
114115
Base_Agent.copy_model_over(self.shared_model, self.local_model)

0 commit comments

Comments
 (0)