(self, data_instances, half_g, encrypted_half_g, batch_index,
                                       current_suffix, offset=None)
return self.host_forwards
gradient = (1/N)*∑(1/2*ywx-1)*1/2yx = (1/N)*∑(0.25 * wx - 0.5 * y) * x, where y = 1 or -1
        Define wx as guest_forward or host_forward
        Define (0.25 * wx - 0.5 * y) as fore_gradient
gradient = (1/N)*∑(1/2*ywx-1)*1/2yx = (1/N)*∑(0.25 * wx - 0.5 * y) * x, where y = 1 or -1
        Define wx as guest_forward or host_forward
        Define (0.25 * wx - 0.5 * y) as fore_gradient
gradient = ( 1 / N ) * ∑ ( 1 / 2 * ywx - 1 ) * 1 / 2yx = ( 1 / N ) * ∑ ( 0 . 25 * wx - 0 . 5 * y ) * x where y = 1 or - 1 Define wx as guest_forward or host_forward Define ( 0 . 25 * wx - 0 . 5 * y ) as fore_gradient
def compute_and_aggregate_forwards(self, data_instances, half_g, encrypted_half_g, batch_index,
                                       current_suffix, offset=None):
        """
        gradient = (1/N)*∑(1/2*ywx-1)*1/2yx = (1/N)*∑(0.25 * wx - 0.5 * y) * x, where y = 1 or -1
        Define wx as guest_forward or host_forward
        Define (0.25 * wx - 0.5 * y) as fore_gradient
        """
        self.host_forwards = self.get_host_forward(suffix=current_suffix)

        # fore_gradient = half_g
        # for host_forward in self.host_forwards:
        #     fore_gradient = fore_gradient.join(host_forward, lambda g, h: g + h)
        # fore_gradient = self.aggregated_forwards.join(data_instances, lambda wx, d: 0.25 * wx - 0.5 * d.label)
        return self.host_forwards
def compute_and_aggregate_forwards ( self , data_instances , half_g , encrypted_half_g , batch_index , current_suffix , offset = None ) : self . host_forwards = self . get_host_forward ( suffix = current_suffix ) # fore_gradient = half_g # for host_forward in self.host_forwards: #     fore_gradient = fore_gradient.join(host_forward, lambda g, h: g + h) # fore_gradient = self.aggregated_forwards.join(data_instances, lambda wx, d: 0.25 * wx - 0.5 * d.label) return self . host_forwards