Skip to content

Commit d2bdd62

Browse files
committed
Fix random seed problem
1 parent d4db289 commit d2bdd62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Contributions are very welcome. If you know how to make this code better, don't
2020
## Usage
2121
```bash
2222
# Works only wih Python 3.
23-
OMP_NUM_THREADS=1 python3 main.py --env-name "PongDeterministic-v4" --num-processes 16
23+
python3 main.py --env-name "PongDeterministic-v4" --num-processes 16
2424
```
2525

2626
This code runs evaluation in a separate thread in addition to 16 processes.

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444

4545
if __name__ == '__main__':
4646
os.environ['OMP_NUM_THREADS'] = '1'
47+
os.environ['CUDA_VISIBLE_DEVICES'] = ""
4748

4849
args = parser.parse_args()
4950

50-
# uncomment when it's fixed in pytorch
51-
# torch.manual_seed(args.seed)
51+
torch.manual_seed(args.seed)
5252
env = create_atari_env(args.env_name)
5353
shared_model = ActorCritic(
5454
env.observation_space.shape[0], env.action_space)

0 commit comments

Comments
 (0)