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

Method __call__

examples/model_selection/Trails/singa_pkg_code/model.py:261–271  ·  view source on GitHub ↗
(self, *input, **kwargs)

Source from the content-addressed store, hash-verified

259 return self.__class__.__name__
260
261 def __call__(self, *input, **kwargs):
262 # print ("in pkg model.py __call__")
263 if self.training:
264 # print ("in pkg model.py train_one_batch")
265 # print ("self: ", self)
266 # print ("self.num_classes: ", self.num_classes)
267 # print ("input[0].shape: ", input[0].shape)
268 return self.train_one_batch(*input, **kwargs)
269 else:
270 # print ("in pkg model.py forward")
271 return self.forward(*input, **kwargs)
272
273 def save_states(self, fpath, aux_states={}):
274 """Save states.

Callers

nothing calls this directly

Calls 2

train_one_batchMethod · 0.95
forwardMethod · 0.95

Tested by

no test coverage detected