jingweiz / pytorch-rl

Deep Reinforcement Learning with pytorch & visdom
MIT License
798 stars 143 forks source link

In python3, change xrange to range to remove python NameError #1

Closed tigerneil closed 7 years ago

tigerneil commented 7 years ago

I run the main.py in python3 environment. It is better to make this clear usage. :)

some error message as follows:

    policy_log_vb = [torch.log(policy_vb[i]) for i in xrange(rollout_steps)]
NameError: name 'xrange' is not defined
Process Process-14:
jingweiz commented 7 years ago

Hey, thanks for the feedback, already fixed!