TensorPlay
API symbolsdistributed
Copy
View MarkdownDownload .md

tensorplay.distributed.algorithms.model_averaging.utils.average_parameters

tensorplay.distributed.algorithms.model_averaging.utils.average_parameters(params: Iterator[Parameter], process_group: ProcessGroup)[source]

Averages all the given parameters.

For allreduce efficiency, all the parameters are flattened into a contiguous buffer. Thus, it requires extra memory of the same size as the given parameters.

Ask DeepWiki