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

Method train_one_batch

examples/cnn_ms/pkg_model_code/model.py:202–211  ·  view source on GitHub ↗

Defines the computation performed in every training iteration Should be overridden by all subclasses. Args: *input: the arguments of train_one_batch **kwargs: the keyword arguments of train_one_batch

(self, *input, **kwargs)

Source from the content-addressed store, hash-verified

200 raise NotImplementedError
201
202 def train_one_batch(self, *input, **kwargs):
203 """Defines the computation performed in every training iteration
204
205 Should be overridden by all subclasses.
206
207 Args:
208 *input: the arguments of train_one_batch
209 **kwargs: the keyword arguments of train_one_batch
210 """
211 raise NotImplementedError
212
213 def train(self, mode=True):
214 """Set the model in evaluation mode.

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected