From dev-return-2971-archive-asf-public=cust-asf.ponee.io@singa.incubator.apache.org Fri Jul 5 06:33:47 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 604A918060F for ; Fri, 5 Jul 2019 08:33:47 +0200 (CEST) Received: (qmail 32976 invoked by uid 500); 5 Jul 2019 06:33:46 -0000 Mailing-List: contact dev-help@singa.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.incubator.apache.org Delivered-To: mailing list dev@singa.incubator.apache.org Received: (qmail 32966 invoked by uid 99); 5 Jul 2019 06:33:46 -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; Fri, 05 Jul 2019 06:33:46 +0000 From: GitBox To: dev@singa.apache.org Subject: [GitHub] [incubator-singa] xuewanqi commented on a change in pull request #468: Distributted module Message-ID: <156230842671.29210.2111739593440979037.gitbox@gitbox.apache.org> Date: Fri, 05 Jul 2019 06:33:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit xuewanqi commented on a change in pull request #468: Distributted module URL: https://github.com/apache/incubator-singa/pull/468#discussion_r300556310 ########## File path: python/singa/dist_opt.py ########## @@ -0,0 +1,27 @@ +from . import singa_wrap as singa + +class Dist_SGD(object): + def __init__(self, lr=0.01, nDev=1): + self.lr=lr + # def start_MPI(): + # pass + # def create_communicator(): + # pass + # could be combined with start_MPI + self.communicator=singa.Communicator(nDev) + self.world_size=self.communicator.totalMPIRanksInGlobal + self.rank_in_local=self.communicator.MPIRankInLocal + self.rank_in_global=self.communicator.MPIRankInGlobal + + def dist_update(self, param, grad): Review comment: ok ---------------------------------------------------------------- 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 With regards, Apache Git Services