Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/singa
/ train_one_batch
Method
train_one_batch
examples/rnn/imdb_model.py:51–55 ·
view source on GitHub ↗
(self, x, y)
Source
from the content-addressed store, hash-verified
49
return
y
50
51
def
train_one_batch(self, x, y):
52
out = self.forward(x)
53
loss = autograd.softmax_cross_entropy(out, y)
54
self.optimizer(loss)
55
return
out, loss
56
57
def
set_opt(self, optimizer):
58
self.optimizer = optimizer
Callers
nothing calls this directly
Calls
1
forward
Method · 0.95
Tested by
no test coverage detected