Skip to main content

sgd_state_to_map

Function sgd_state_to_map 

Source
pub fn sgd_state_to_map(
    velocity: &HashMap<u64, Tensor>,
) -> HashMap<String, Tensor>
Expand description

Flatten SGD velocity buffers into a string-keyed map for serialization.

Keys: "sgd.{param_id}.velocity"