singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-singa] nudles commented on a change in pull request #468: Distributted module
Date Wed, 03 Jul 2019 14:03:18 GMT
nudles commented on a change in pull request #468: Distributted module
URL: https://github.com/apache/incubator-singa/pull/468#discussion_r299967265
 
 

 ##########
 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:
   rename it to update(...)

----------------------------------------------------------------
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

Mime
View raw message