MCPcopy Create free account
hub / github.com/kyegomez/BitNet / eval_decorator

Function eval_decorator

bitnet/at.py:13–21  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

11
12
13def eval_decorator(fn):
14 def inner(model, *args, **kwargs):
15 was_training = model.training
16 model.eval()
17 out = fn(model, *args, **kwargs)
18 model.train(was_training)
19 return out
20
21 return inner
22
23
24# top k filtering

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected