MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / train_batch

Method train_batch

python/paddle/hapi/model.py:370–378  ·  view source on GitHub ↗
(self, inputs, labels=None, update=True)

Source from the content-addressed store, hash-verified

368 self.model.mode = value
369
370 def train_batch(self, inputs, labels=None, update=True):
371 assert self.model._optimizer, (
372 "model not ready, please call `model.prepare()` first"
373 )
374 self.mode = 'train'
375 assert update is True, (
376 "Does not support `update == False` in static graph mode by now."
377 )
378 return self._run(inputs, labels)
379
380 def eval_batch(self, inputs, labels=None):
381 self.mode = 'eval'

Callers

nothing calls this directly

Calls 1

_runMethod · 0.95

Tested by

no test coverage detected