(self, data, num_epochs=1, batch_size=10)
return comp, update
Trains the client model.

        Args:
            data: Dict of the form {'x': [list], 'y': [list]}.
            num_epochs: Number of epochs to train.
            batch_size: Size of training batches.
        Return:
            comp: Number of FLOPs computed while training given data
            update: List of np.ndarray weights, with each weight array
                corresponding to a variable in the resulting graph
Trains the client model.
Trains the client model .
def train(self, data, num_epochs=1, batch_size=10):
        """
        Trains the client model.

        Args:
            data: Dict of the form {'x': [list], 'y': [list]}.
            num_epochs: Number of epochs to train.
            batch_size: Size of training batches.
        Return:
            comp: Number of FLOPs computed while training given data
            update: List of np.ndarray weights, with each weight array
                corresponding to a variable in the resulting graph
        """
        for _ in range(num_epochs):
            self.run_epoch(data, batch_size)

        update = self.get_params()
        comp = num_epochs * (len(data['y'])//batch_size) * batch_size * self.flops
        return comp, update
def train ( self , data , num_epochs = 1 , batch_size = 10 ) : for _ in range ( num_epochs ) : self . run_epoch ( data , batch_size ) update = self . get_params ( ) comp = num_epochs * ( len ( data [ 'y' ] ) // batch_size ) * batch_size * self . flops return comp , update