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

Method train

examples/cnn_ms/pkg_model_code/model.py:213–220  ·  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

211 raise NotImplementedError
212
213 def train(self, mode=True):
214 """Set the model in evaluation mode.
215
216 Args:
217 mode(bool): when mode is True, this model will enter training mode
218 """
219 self.training = mode
220 autograd.training = mode
221
222 def eval(self):
223 """Sets the model in evaluation mode.

Callers 9

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

Calls

no outgoing calls

Tested by

no test coverage detected