MCPcopy Index your code
hub / github.com/apple/ml-pointersect / eval

Method eval

cdslib/core/models/base_model.py:159–167  ·  view source on GitHub ↗

Set all the nn.modules to evaluation mode.

(self)

Source from the content-addressed store, hash-verified

157 v.train()
158
159 def eval(self):
160 """Set all the nn.modules to evaluation mode."""
161 vs = inspect.getmembers(self, lambda v: isinstance(v, BaseModel))
162 for v_name, v in vs:
163 v.eval()
164
165 vs = inspect.getmembers(self, lambda v: isinstance(v, torch.nn.Module))
166 for v_name, v in vs:
167 v.eval()
168
169 def load_state_dict(
170 self,

Callers 4

testMethod · 0.80
_set_eval_modeMethod · 0.80
load_modelFunction · 0.80
load_pointersectFunction · 0.80

Calls

no outgoing calls

Tested by 1

testMethod · 0.64