Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dgriff777 authored May 11, 2018
1 parent 3f7d8fa commit acf4fe8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ def train(rank, args, shared_model, optimizer, env_conf):
break

if player.done:
if player.info['ale.lives'] == 0 or player.max_length:
player.eps_len = 0
state = player.env.reset()
player.eps_len += 2
player.state = torch.from_numpy(state).float()
if gpu_id >= 0:
with torch.cuda.device(gpu_id):
Expand Down Expand Up @@ -109,4 +106,3 @@ def train(rank, args, shared_model, optimizer, env_conf):
ensure_shared_grads(player.model, shared_model, gpu=gpu_id >= 0)
optimizer.step()
player.clear_actions()

0 comments on commit acf4fe8

Please sign in to comment.