コード例 #1
0
ファイル: enter_point.py プロジェクト: xthzhjwzyc/FedRec
 def __init__(self,
              server=(consts.ARBITER, ),
              clients=(consts.GUEST, consts.HOST),
              prefix=None):
     super().__init__(server=server, clients=clients, prefix=prefix)
     self.secure_aggregator_trans_var = SecureAggregatorTransVar(
         server=server, clients=clients, prefix=self.prefix)
     self.loss_scatter_trans_var = LossScatterTransVar(server=server,
                                                       clients=clients,
                                                       prefix=self.prefix)
     self.has_converged_trans_var = HasConvergedTransVar(server=server,
                                                         clients=clients,
                                                         prefix=self.prefix)
コード例 #2
0
 def __init__(self,
              server=(consts.ARBITER, ),
              clients=(
                  consts.GUEST,
                  consts.HOST,
              ),
              prefix=None):
     super().__init__(server=server, clients=clients, prefix=prefix)
     self.loss_scatter = LossScatterTransVar(server=server,
                                             clients=clients,
                                             prefix=self.prefix)
     self.has_converged = HasConvergedTransVar(server=server,
                                               clients=clients,
                                               prefix=self.prefix)
     self.model_scatter = ModelScatterTransVar(server=server,
                                               clients=clients,
                                               prefix=self.prefix)
     self.model_broadcaster = ModelBroadcasterTransVar(server=server,
                                                       clients=clients,
                                                       prefix=self.prefix)
     self.random_padding_cipher = RandomPaddingCipherTransVar(
         server=server, clients=clients, prefix=self.prefix)