Change demo file compatible to python2 (#40)

* Change demo file to python2 compatible

* Add object to classes for compatibility with python2
This commit is contained in:
Whi Kwon
2019-04-07 13:06:39 +09:00
committed by GitHub
parent a130293f8b
commit 16ae4375c9
6 changed files with 6 additions and 6 deletions
@@ -11,7 +11,7 @@ from algorithms.common.helper_functions import get_n_step_info
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
class ReplayBuffer:
class ReplayBuffer(object):
"""Fixed-size buffer to store experience tuples.
Taken from Udacity deep-reinforcement-learning github repository:
@@ -79,7 +79,7 @@ class ReplayBuffer:
return len(self.buffer)
class NStepTransitionBuffer:
class NStepTransitionBuffer(object):
"""Fixed-size buffer to store experience tuples.
Attributes:
@@ -4,7 +4,7 @@
import operator
class SegmentTree:
class SegmentTree(object):
""" Create SegmentTree.
Taken from OpenAI baselines github repository: