update
This commit is contained in:
@ -74,6 +74,7 @@ class DQN(object):
|
|||||||
# target parameter update
|
# target parameter update
|
||||||
if self.learn_step_counter % TARGET_REPLACE_ITER == 0:
|
if self.learn_step_counter % TARGET_REPLACE_ITER == 0:
|
||||||
self.target_net.load_state_dict(self.eval_net.state_dict())
|
self.target_net.load_state_dict(self.eval_net.state_dict())
|
||||||
|
self.learn_step_counter += 1
|
||||||
|
|
||||||
# sample batch transitions
|
# sample batch transitions
|
||||||
sample_index = np.random.choice(MEMORY_CAPACITY, BATCH_SIZE)
|
sample_index = np.random.choice(MEMORY_CAPACITY, BATCH_SIZE)
|
||||||
|
|||||||
Reference in New Issue
Block a user