add_params

elephas.utils.functional_utils.add_params(param_list_left, param_list_right)

Add two lists of parameters one by one

:param param_list_left: list of numpy arrays :param param_list_right: list of numpy arrays :return: list of numpy arrays


subtract_params

elephas.utils.functional_utils.subtract_params(param_list_left, param_list_right)

Subtract two lists of parameters

:param param_list_left: list of numpy arrays :param param_list_right: list of numpy arrays :return: list of numpy arrays


get_neutral

elephas.utils.functional_utils.get_neutral(array_list)

Get list of zero-valued numpy arrays for specified list of numpy arrays

:param array_list: list of numpy arrays :return: list of zeros of same shape as input


divide_by

elephas.utils.functional_utils.divide_by(array_list, num_workers)

Divide a list of parameters by an integer num_workers.

:param array_list: :param num_workers: :return: