From dev-return-6115-archive-asf-public=cust-asf.ponee.io@singa.apache.org Tue Aug 18 07:53:32 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id CD893180652 for ; Tue, 18 Aug 2020 09:53:32 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 08B18124786 for ; Tue, 18 Aug 2020 07:53:32 +0000 (UTC) Received: (qmail 18473 invoked by uid 500); 18 Aug 2020 07:53:31 -0000 Mailing-List: contact dev-help@singa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.apache.org Delivered-To: mailing list dev@singa.apache.org Received: (qmail 18462 invoked by uid 99); 18 Aug 2020 07:53:31 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2020 07:53:31 +0000 From: =?utf-8?q?GitBox?= To: dev@singa.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bsinga=5D_chrishkchris_edited_a_comment_on_pull_req?= =?utf-8?q?uest_=23730=3A_Support_training_RNN_with_computational_graph?= Message-ID: <159773721172.32230.16804251645684234275.asfpy@gitbox.apache.org> Date: Tue, 18 Aug 2020 07:53:31 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: chrishkchris edited a comment on pull request #730: URL: https://github.com/apache/singa/pull/730#issuecomment-675314772 Now it can train with graph with Shicong's updated QAbot. ``` root@64926e30597f:~/dcsysh/singa/examples/qabot# python3 qabot_train.py training... 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.90it/s] epoch 0, time used 9 sec, loss: [0.1953166] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.94it/s] epoch 1, time used 9 sec, loss: [0.1842717] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 38.06it/s] epoch 2, time used 9 sec, loss: [0.17120531] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.85it/s] epoch 3, time used 9 sec, loss: [0.15659554] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.60it/s] epoch 4, time used 9 sec, loss: [0.14186905] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.72it/s] epoch 5, time used 9 sec, loss: [0.12687057] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.31it/s] epoch 6, time used 9 sec, loss: [0.11330745] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.56it/s] epoch 7, time used 9 sec, loss: [0.10517868] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.87it/s] epoch 8, time used 9 sec, loss: [0.09949535] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.78it/s] epoch 9, time used 9 sec, loss: [0.09496956] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.21it/s] epoch 10, time used 9 sec, loss: [0.09362301] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.66it/s] epoch 11, time used 9 sec, loss: [0.08997396] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 36.91it/s] epoch 12, time used 9 sec, loss: [0.08700882] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.15it/s] epoch 13, time used 9 sec, loss: [0.08304847] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.49it/s] epoch 14, time used 9 sec, loss: [0.08242358] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.53it/s] epoch 15, time used 9 sec, loss: [0.07986118] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.33it/s] epoch 16, time used 9 sec, loss: [0.07836731] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.47it/s] epoch 17, time used 9 sec, loss: [0.07502404] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.09it/s] epoch 18, time used 9 sec, loss: [0.07383821] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.17it/s] epoch 19, time used 9 sec, loss: [0.07297999] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.13it/s] epoch 20, time used 9 sec, loss: [0.07262956] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.52it/s] epoch 21, time used 9 sec, loss: [0.06984172] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 36.93it/s] epoch 22, time used 9 sec, loss: [0.06915592] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.34it/s] epoch 23, time used 9 sec, loss: [0.06900614] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 36.89it/s] epoch 24, time used 9 sec, loss: [0.06566793] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.18it/s] epoch 25, time used 9 sec, loss: [0.06551438] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.39it/s] epoch 26, time used 9 sec, loss: [0.06489938] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.57it/s] epoch 27, time used 9 sec, loss: [0.06497826] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 36.94it/s] epoch 28, time used 9 sec, loss: [0.06379581] 100%|#######################################################################################################################################| 257/257 [00:06<00:00, 37.34it/s] epoch 29, time used 9 sec, loss: [0.06174631] Eval with train data... 100%|#####################################################################################################################################| 2000/2000 [00:30<00:00, 66.31it/s] eval top 100 accuracy 0.232 time used 30 sec Eval with test data... 100%|#####################################################################################################################################| 2000/2000 [00:30<00:00, 66.61it/s] eval top 100 accuracy 0.18 time used 30 sec ``` Moreover, since this PR modified the graph operation, I have tested the compatibility with the latest dev (by updated the code with dev branch): ``` root@64926e30597f:~/dcsysh/singa/test/python# python3 test_operation.py ......................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 201 tests in 13.961s OK root@64926e30597f:~/dcsysh/singa/test/python# python3 test_api.py ................................. ---------------------------------------------------------------------- Ran 33 tests in 1.217s OK root@64926e30597f:~/dcsysh/singa/examples/cnn# python3 train_cnn.py cnn mnist Starting Epoch 0: Training loss = 596.964600, training accuracy = 0.789421 Evaluation accuracy = 0.943209, Elapsed Time = 3.368356s Starting Epoch 1: Training loss = 234.664322, training accuracy = 0.920758 Evaluation accuracy = 0.960036, Elapsed Time = 3.357281s Starting Epoch 2: Training loss = 165.501694, training accuracy = 0.944454 Evaluation accuracy = 0.971254, Elapsed Time = 3.367433s Starting Epoch 3: Training loss = 138.790848, training accuracy = 0.953559 Evaluation accuracy = 0.968950, Elapsed Time = 3.360643s Starting Epoch 4: Training loss = 119.547195, training accuracy = 0.959595 Evaluation accuracy = 0.970553, Elapsed Time = 3.378615s Starting Epoch 5: Training loss = 104.691002, training accuracy = 0.965432 Evaluation accuracy = 0.974960, Elapsed Time = 3.362698s Starting Epoch 6: Training loss = 97.578346, training accuracy = 0.967149 Evaluation accuracy = 0.980769, Elapsed Time = 3.352607s Starting Epoch 7: Training loss = 88.555130, training accuracy = 0.970384 Evaluation accuracy = 0.978966, Elapsed Time = 3.359915s Starting Epoch 8: Training loss = 81.243462, training accuracy = 0.973269 Evaluation accuracy = 0.975260, Elapsed Time = 3.366649s Starting Epoch 9: Training loss = 78.500534, training accuracy = 0.973786 Evaluation accuracy = 0.980168, Elapsed Time = 3.371324s ``` ---------------------------------------------------------------- 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: users@infra.apache.org