MCPcopy Index your code
hub / github.com/princewen/tensorflow_practice / append

Method append

RL/Basic-Rainbow-Net/replayMemory.py:16–23  ·  view source on GitHub ↗
(self,old_state,action,reward,new_state,is_terminal)

Source from the content-addressed store, hash-verified

14
15
16 def append(self,old_state,action,reward,new_state,is_terminal):
17
18 num_sample = len(old_state)
19 if len(self._memory) >= self._max_size:
20 del(self._memory[0:num_sample])
21
22 for o_s,a,r,n_s,i_t in zip(old_state,action,reward,new_state,is_terminal):
23 self._memory.append((o_s,a,r,n_s,i_t))
24
25 def sample(self,batch_size,indexes=None):
26

Callers 15

mainFunction · 0.45
build_discriminatorMethod · 0.45
target_lossFunction · 0.45
__init__Method · 0.45
create_batchesMethod · 0.45
load_train_dataMethod · 0.45
__init__Method · 0.45
build_sample_networkMethod · 0.45
evalFunction · 0.45
create_dataFunction · 0.45
mlr.pyFile · 0.45

Calls

no outgoing calls

Tested by 1

mainFunction · 0.36