MCPcopy Create free account
hub / github.com/apache/singa / train

Method train

examples/model_selection/Trails/singa_pkg_code/model.py:233–240  ·  view source on GitHub ↗

Set the model in evaluation mode. Args: mode(bool): when mode is True, this model will enter training mode

(self, mode=True)

Source from the content-addressed store, hash-verified

231 raise NotImplementedError
232
233 def train(self, mode=True):
234 """Set the model in evaluation mode.
235
236 Args:
237 mode(bool): when mode is True, this model will enter training mode
238 """
239 self.training = mode
240 autograd.training = mode
241
242 def eval(self):
243 """Sets the model in evaluation mode.

Callers 5

evalMethod · 0.95
runFunction · 0.45
model.pyFile · 0.45
model.pyFile · 0.45
model.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected