MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / eval_mode

Function eval_mode

k_diffusion/utils.py:83–86  ·  view source on GitHub ↗

A context manager that places a model into evaluation mode and restores the previous mode on exit.

(model)

Source from the content-addressed store, hash-verified

81
82
83def eval_mode(model):
84 """A context manager that places a model into evaluation mode and restores
85 the previous mode on exit."""
86 return train_mode(model, False)
87
88
89@torch.no_grad()

Callers

nothing calls this directly

Calls 1

train_modeFunction · 0.85

Tested by

no test coverage detected