XJDKC commented on a change in pull request #697: URL: https://github.com/apache/singa/pull/697#discussion_r433577217
########## File path: examples/rnn/train.py ########## @@ -59,12 +60,12 @@ def forward(self, inputs): x = autograd.reshape(x, (-1, self.hidden_size)) return self.dense(x) - def loss(self, out, ty): - ty = autograd.reshape(ty, (-1, 1)) - return autograd.softmax_cross_entropy(out, ty) - - def optim(self, loss): + def train_one_batch(self, x, y): + out = self.forward(x) Review comment: I will fix it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org