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

Method eval

python/paddle/distributed/auto_parallel/api.py:3069–3079  ·  view source on GitHub ↗

Set the mode of DistModel to "eval". In "eval" mode, executing ``__call__`` will return the loss.

(self)

Source from the content-addressed store, hash-verified

3067 paddle.disable_static()
3068
3069 def eval(self) -> None:
3070 """
3071 Set the mode of DistModel to "eval". In "eval" mode,
3072 executing ``__call__`` will return the loss.
3073 """
3074 if not self._engine._has_prepared["eval"]:
3075 self._engine._prepare_program(mode="eval", init_parameters=False)
3076
3077 self._mode = "eval"
3078 self._engine.to_mode("eval")
3079 paddle.disable_static()
3080
3081 def predict(self) -> None:
3082 """

Callers 3

__init__Method · 0.95
eval_batchMethod · 0.45
eval_batchMethod · 0.45

Calls 2

to_modeMethod · 0.80
_prepare_programMethod · 0.45

Tested by

no test coverage detected