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

Method train_batch

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

Source from the content-addressed store, hash-verified

756 self.model.mode = value
757
758 def train_batch(self, inputs, labels=None, update=True):
759 assert self.model._optimizer, (
760 "model not ready, please call `model.prepare()` first"
761 )
762 self.mode = 'train'
763 assert update is True, (
764 "Does not support `update == False` in static graph mode by now."
765 )
766 return self._run(inputs, labels)
767
768 def eval_batch(self, inputs, labels=None):
769 self.mode = 'eval'

Callers

nothing calls this directly

Calls 1

_runMethod · 0.95

Tested by

no test coverage detected