MCPcopy Index your code
hub / github.com/pytorch/tutorials / push

Method push

intermediate_source/reinforcement_q_learning.py:143–145  ·  view source on GitHub ↗

Save a transition

(self, *args)

Source from the content-addressed store, hash-verified

141 self.memory = deque([], maxlen=capacity)
142
143 def push(self, *args):
144 """Save a transition"""
145 self.memory.append(Transition(*args))
146
147 def sample(self, batch_size):
148 return random.sample(self.memory, batch_size)

Callers 2

custom_test.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected