|
| std::vector< float > | flatten_parameters (const std::vector< torch::Tensor > ¶meters) |
| | The values of the parameters, one after the other.
|
| std::vector< float > | flatten_gradients (const std::vector< torch::Tensor > ¶meters) |
| | The gradients of the parameters, one after the other; 0 where a parameter has none.
|
| void | set_parameters (const std::vector< torch::Tensor > ¶meters, const std::vector< float > &values) |
| | Copy values, as flatten_parameters() gives them, into the parameters.
|
| void | set_gradients (const std::vector< torch::Tensor > ¶meters, const std::vector< float > &values) |
| | Copy values, as flatten_gradients() gives them, into the gradients.
|
| void | average_gradients (Communicator &communicator, const std::vector< torch::Tensor > ¶meters) |
| | Replace the gradients of every rank with their mean over the ranks.
|
| void | broadcast_parameters (Communicator &communicator, const std::vector< torch::Tensor > ¶meters, uint_t root=0) |
| | Give every rank the parameters of root.
|
| std::uint64_t | parameters_checksum (const std::vector< torch::Tensor > ¶meters) |
| | A checksum of the parameters, to tell that the ranks have the same.
|