Пример #1
0
def client_init_model(self, param):
    self.aggregate_iteration_num = 0
    self.aggregator = secure_mean_aggregator.Client(
        self.transfer_variable.secure_aggregator_trans_var)
    self.loss_scatter = loss_scatter.Client(
        self.transfer_variable.loss_scatter_trans_var)
    self.has_converged = has_converged.Client(
        self.transfer_variable.has_converged_trans_var)
    client_set_params(self, param)
Пример #2
0
    def __init__(self, trans_var):
        super().__init__(trans_var=trans_var)
        self.aggregator = secure_mean_aggregator.Client(
            self.transfer_variable.secure_aggregator_trans_var)
        self.loss_scatter = loss_scatter.Client(
            self.transfer_variable.loss_scatter_trans_var)
        self.has_converged = has_converged.Client(
            self.transfer_variable.has_converged_trans_var)

        self.nn_model = None
Пример #3
0
    def __init__(self, trans_var):
        super().__init__(trans_var=trans_var)
        self.aggregator = secure_mean_aggregator.Client(self.transfer_variable.secure_aggregator_trans_var)
        self.loss_scatter = loss_scatter.Client(self.transfer_variable.loss_scatter_trans_var)
        self.has_converged = has_converged.Client(self.transfer_variable.has_converged_trans_var)

        self.nn_model = None
        self._summary = dict(loss_history=[], is_converged=False)
        self._header = []
        self._label_align_mapping = None
Пример #4
0
    def __init__(self, trans_var=LegacyAggregatorTransVar()):
        self._enable_secure_aggregate = False

        self._loss_sync = loss_scatter.Client(trans_var.loss_scatter)
        self._converge_sync = has_converged.Client(trans_var.has_converged)
        self._model_scatter = model_scatter.Client(trans_var.model_scatter)
        self._model_broadcaster = model_broadcaster.Client(
            trans_var.model_broadcaster)
        self._random_padding_cipher = random_padding_cipher.Client(
            trans_var.random_padding_cipher)
Пример #5
0
def model_broadcaster_call(job_id, role, ind, *args):
    status = args[0]
    if role == consts.ARBITER:
        return has_converged.Server().remote_converge_status(status)
    else:
        return has_converged.Client().get_converge_status()
Пример #6
0
 def __init__(self, ):
     self.loss_scatter = loss_scatter.Client()
     self.has_converged = has_converged.Client()