You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by ch...@apache.org on 2020/09/18 03:07:09 UTC
[singa-doc] 01/01: remove duplicated lines
This is an automated email from the ASF dual-hosted git repository.
chrishkchris pushed a commit to branch chrishkchris-patch-1
in repository https://gitbox.apache.org/repos/asf/singa-doc.git
commit c5a1814a4c8453d34c2a3481cc23ff670e2b3e93
Author: Chris Yeung <38...@users.noreply.github.com>
AuthorDate: Fri Sep 18 11:06:50 2020 +0800
remove duplicated lines
---
docs-site/docs/dist-train.md | 4 ----
1 file changed, 4 deletions(-)
diff --git a/docs-site/docs/dist-train.md b/docs-site/docs/dist-train.md
index 24d956f..b6cc0da 100644
--- a/docs-site/docs/dist-train.md
+++ b/docs-site/docs/dist-train.md
@@ -168,10 +168,6 @@ for epoch in range(max_epoch):
y = train_y[idx[b * batch_size: (b + 1) * batch_size]]
tx.copy_from_numpy(x)
ty.copy_from_numpy(y)
- out = model.forward(tx)
- loss = autograd.softmax_cross_entropy(out, ty)
- # do backpropagation and all-reduce
- sgd.backward_and_update(loss)
# Train the model
out, loss = model(tx, ty)
```