Skip to main content

ternary_blob

Function ternary_blob 

Source
pub fn ternary_blob(weights: &[f32]) -> Vec<u8> 
Expand description

Encode a weight tensor to a self-describing ternary blob: [scale: f32 LE][packed trits]. (The element count is recovered from the tensor’s shape in the container manifest.)