(self, data_instances, encrypted_calculator, model_weights,
                                   optimizer,
                                   n_iter_, batch_index)
return optimized_gradient
Linear model gradient procedure
        Step 1: get host forwards which differ from different algorithm
                For Logistic Regression: forwards = wx
Linear model gradient procedure
        Step 1: get host forwards which differ from different algorithm
                For Logistic Regression: forwards = wx
Linear model gradient procedure Step 1 : get host forwards which differ from different algorithm For Logistic Regression : forwards = wx
def compute_gradient_procedure(self, data_instances, encrypted_calculator, model_weights,
                                   optimizer,
                                   n_iter_, batch_index):
        """
        Linear model gradient procedure
        Step 1: get host forwards which differ from different algorithm
                For Logistic Regression: forwards = wx


        """
        current_suffix = (n_iter_, batch_index)

        self.forwards = self.compute_forwards(data_instances, model_weights)

        if self.use_async:
            unilateral_gradient = self._asynchronous_compute_gradient(data_instances,
                                                                      encrypted_calculator[batch_index],
                                                                      current_suffix)
        else:
            unilateral_gradient = self._centralized_compute_gradient(data_instances,
                                                                     encrypted_calculator[batch_index],
                                                                     current_suffix)

        if optimizer is not None:
            unilateral_gradient = optimizer.add_regular_to_grad(unilateral_gradient, model_weights)

        optimized_gradient = self.update_gradient(unilateral_gradient, suffix=current_suffix)
        LOGGER.debug(f"Before return compute_gradient_procedure")
        return optimized_gradient
def compute_gradient_procedure ( self , data_instances , encrypted_calculator , model_weights , optimizer , n_iter_ , batch_index ) : current_suffix = ( n_iter_ , batch_index ) self . forwards = self . compute_forwards ( data_instances , model_weights ) if self . use_async : unilateral_gradient = self . _asynchronous_compute_gradient ( data_instances , encrypted_calculator [ batch_index ] , current_suffix ) else : unilateral_gradient = self . _centralized_compute_gradient ( data_instances , encrypted_calculator [ batch_index ] , current_suffix ) if optimizer is not None : unilateral_gradient = optimizer . add_regular_to_grad ( unilateral_gradient , model_weights ) optimized_gradient = self . update_gradient ( unilateral_gradient , suffix = current_suffix ) LOGGER . debug ( f"Before return compute_gradient_procedure" ) return optimized_gradient