MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / train

Method train

examples/reinforcement_learning/tutorial_DQN_variants.py:323–329  ·  view source on GitHub ↗
(self, b_o, b_a, b_r, b_o_, b_d)

Source from the content-addressed store, hash-verified

321 return self.qnet(obv)
322
323 def train(self, b_o, b_a, b_r, b_o_, b_d):
324 self._train_func(b_o, b_a, b_r, b_o_, b_d)
325
326 self.niter += 1
327 if self.niter % target_q_update_freq == 0:
328 sync(self.qnet, self.targetqnet)
329 self.save(args.save_path)
330
331 @tf.function
332 def _train_func(self, b_o, b_a, b_r, b_o_, b_d):

Callers 2

__init__Method · 0.45

Calls 3

_train_funcMethod · 0.95
saveMethod · 0.95
syncFunction · 0.70

Tested by

no test coverage detected