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

Method train_one_batch

test/python/test_model.py:98–102  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

96 return y
97
98 def train_one_batch(self, x, y):
99 out = self.forward(x)
100 loss = self.softmax_cross_entropy(out, y)
101 self.optimizer(loss)
102 return out, loss
103
104 def set_optimizer(self, optimizer):
105 self.optimizer = optimizer

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.95

Tested by

no test coverage detected